diff --git a/.justforgithub b/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/.justforgithub b/Handwriting program/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/.justforgithub b/Handwriting program/Handwriting program/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/Handwriting.cs b/Handwriting program/Handwriting program/Handwriting.cs index 736bf87..f72c044 100644 --- a/Handwriting program/Handwriting program/Handwriting.cs +++ b/Handwriting program/Handwriting program/Handwriting.cs @@ -81,12 +81,17 @@ namespace Handwriting_program private Bitmap bmp; private bool drawing = false; private Thread MainT; + private object lockobj = new object(); //2015.06.06. 0:07 private void Handwriting_MouseDown(object sender, MouseEventArgs e) { /*timer.Interval = 100; timer.Tick += timer_Tick; timer.Start();*/ - drawing = true; + lock (lockobj) + { + drawing = true; + Monitor.Pulse(lockobj); //2015.06.06. + } } //void timer_Tick(object sender, EventArgs e) @@ -94,55 +99,60 @@ namespace Handwriting_program { while (MainT.IsAlive) { - if (!drawing) + lock (lockobj) { - prevp = new Point(); - continue; - } - //GC.Collect(); - /*var bm = new Bitmap(pictureBox1.Image); - Point p = pictureBox1.PointToClient(Cursor.Position);*/ - Point p = new Point(); - //this.Invoke(new Action(() => p = this.PointToClient(Cursor.Position))); - this.Invoke(new Action(() => p = panel1.PointToClient(Cursor.Position))); //2014.11.08. - //Graphics gr = this.CreateGraphics(); - //this.Invoke(new Action(() => gr = this.CreateGraphics())); - this.Invoke(new Action(() => gr = panel1.CreateGraphics())); //2014.11.08. - /*if (bmp != null) - { - bmp.Dispose(); - bmp = null; - } - bmp = new Bitmap(this.Width, this.Height);*/ - this.Invoke(new Action(() => bmpgr = Graphics.FromImage(bmp))); - var tmppen = (Pen)pen.Clone(); - if (Erase) - tmppen.Color = Color.White; //2014.11.08. - gr.DrawLine(tmppen, p, ((prevp.X != 0 && prevp.Y != 0) ? prevp : p)); - //if (Erase) + //if (!drawing) //TODO: Optimalizálás, és a thread leállítása, ha már nincs rá szükség + while (!drawing) //while: 2015.06.06. + { + Monitor.Wait(lockobj); //2015.06.06. + prevp = new Point(); + //continue; + } + //GC.Collect(); + /*var bm = new Bitmap(pictureBox1.Image); + Point p = pictureBox1.PointToClient(Cursor.Position);*/ + Point p = new Point(); + //this.Invoke(new Action(() => p = this.PointToClient(Cursor.Position))); + this.Invoke(new Action(() => p = panel1.PointToClient(Cursor.Position))); //2014.11.08. + //Graphics gr = this.CreateGraphics(); + //this.Invoke(new Action(() => gr = this.CreateGraphics())); + this.Invoke(new Action(() => gr = panel1.CreateGraphics())); //2014.11.08. + /*if (bmp != null) + { + bmp.Dispose(); + bmp = null; + } + bmp = new Bitmap(this.Width, this.Height);*/ + this.Invoke(new Action(() => bmpgr = Graphics.FromImage(bmp))); + var tmppen = (Pen)pen.Clone(); + if (Erase) + tmppen.Color = Color.White; //2014.11.08. + gr.DrawLine(tmppen, p, ((prevp.X != 0 && prevp.Y != 0) ? prevp : p)); + //if (Erase) //tmppen.Color = Color.Transparent; //2014.11.08. //tmppen.Color = Color.Empty; //2014.12.05. - bmpgr.DrawLine(tmppen, p, ((prevp.X != 0 && prevp.Y != 0) ? prevp : p)); - if (Erase) - bmp.MakeTransparent(Color.White); //2014.12.05. - prevp = p; - //Bitmap tmpbmp = new Bitmap(this.Width, this.Height); - //Bitmap tmpbmp = new Bitmap(panel1.Width, panel1.Height, PixelFormat.Format64bppArgb); //2014.11.08. - 2014.12.05. - PixelFormat - Bitmap tmpbmp = new Bitmap(panel1.Width, panel1.Height); - using (Graphics g = Graphics.FromImage(tmpbmp)) - //g.DrawImage(bmp, 0, 0, this.Width, this.Height); - g.DrawImage(bmp, 0, 0, panel1.Width, panel1.Height); //2014.11.08. - bmp.Dispose(); - bmp = tmpbmp; - - /*if (bmp != null) - { + bmpgr.DrawLine(tmppen, p, ((prevp.X != 0 && prevp.Y != 0) ? prevp : p)); + if (Erase) + bmp.MakeTransparent(Color.White); //2014.12.05. + prevp = p; + //Bitmap tmpbmp = new Bitmap(this.Width, this.Height); + //Bitmap tmpbmp = new Bitmap(panel1.Width, panel1.Height, PixelFormat.Format64bppArgb); //2014.11.08. - 2014.12.05. - PixelFormat + Bitmap tmpbmp = new Bitmap(panel1.Width, panel1.Height); + using (Graphics g = Graphics.FromImage(tmpbmp)) + //g.DrawImage(bmp, 0, 0, this.Width, this.Height); + g.DrawImage(bmp, 0, 0, panel1.Width, panel1.Height); //2014.11.08. bmp.Dispose(); - bmp = null; + bmp = tmpbmp; + + /*if (bmp != null) + { + bmp.Dispose(); + bmp = null; + } + bmp = new Bitmap(this.Width, this.Height); + this.Invoke(new Action(() => this.DrawToBitmap(bmp, new Rectangle(new Point(), this.Size))));*/ + GC.Collect(); } - bmp = new Bitmap(this.Width, this.Height); - this.Invoke(new Action(() => this.DrawToBitmap(bmp, new Rectangle(new Point(), this.Size))));*/ - GC.Collect(); } /*if (p.X < 0 || p.X >= bm.Width || p.Y < 0 || p.Y >= bm.Height) return; @@ -234,7 +244,7 @@ namespace Handwriting_program catch (ArgumentException) { }*/ - //Refresh(); + //Refresh(); //} /*void resizeT_Tick(object sender, EventArgs e) @@ -262,7 +272,8 @@ namespace Handwriting_program { /*var bmp = new Bitmap(this.Width, this.Height); this.DrawToBitmap(bmp, new Rectangle(new Point(), this.Size));*/ - return bmp; + //return bmp; + return (Bitmap)bmp.Clone(); //2015.07.05. 0:30 } private void Handwriting_Paint(object sender, PaintEventArgs e) diff --git a/Handwriting program/Handwriting program/Properties/.justforgithub b/Handwriting program/Handwriting program/Properties/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/Resources/.justforgithub b/Handwriting program/Handwriting program/Resources/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/bin/.justforgithub b/Handwriting program/Handwriting program/bin/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/bin/Debug/.justforgithub b/Handwriting program/Handwriting program/bin/Debug/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/bin/Debug/Anya szerint harcoló kínai.bmp b/Handwriting program/Handwriting program/bin/Debug/Anya szerint harcoló kínai.bmp deleted file mode 100644 index 0457634..0000000 Binary files a/Handwriting program/Handwriting program/bin/Debug/Anya szerint harcoló kínai.bmp and /dev/null differ diff --git a/Handwriting program/Handwriting program/bin/Debug/Handwriting program.dll b/Handwriting program/Handwriting program/bin/Debug/Handwriting program.dll index d949d4e..7a3f8fa 100644 Binary files a/Handwriting program/Handwriting program/bin/Debug/Handwriting program.dll and b/Handwriting program/Handwriting program/bin/Debug/Handwriting program.dll differ diff --git a/Handwriting program/Handwriting program/bin/Debug/Handwriting program.pdb b/Handwriting program/Handwriting program/bin/Debug/Handwriting program.pdb index b9cda3d..4721f6e 100644 Binary files a/Handwriting program/Handwriting program/bin/Debug/Handwriting program.pdb and b/Handwriting program/Handwriting program/bin/Debug/Handwriting program.pdb differ diff --git a/Handwriting program/Handwriting program/bin/Release/.justforgithub b/Handwriting program/Handwriting program/bin/Release/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll b/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll new file mode 100644 index 0000000..496f949 Binary files /dev/null and b/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll differ diff --git a/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll.config b/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll.config new file mode 100644 index 0000000..fad249e --- /dev/null +++ b/Handwriting program/Handwriting program/bin/Release/Handwriting program.dll.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Handwriting program/Handwriting program/bin/Release/Handwriting program.pdb b/Handwriting program/Handwriting program/bin/Release/Handwriting program.pdb new file mode 100644 index 0000000..2a6c2d4 Binary files /dev/null and b/Handwriting program/Handwriting program/bin/Release/Handwriting program.pdb differ diff --git a/Handwriting program/Handwriting program/obj/.justforgithub b/Handwriting program/Handwriting program/obj/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Debug/.justforgithub b/Handwriting program/Handwriting program/obj/Debug/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Debug/Handwriting program.dll b/Handwriting program/Handwriting program/obj/Debug/Handwriting program.dll index d949d4e..7a3f8fa 100644 Binary files a/Handwriting program/Handwriting program/obj/Debug/Handwriting program.dll and b/Handwriting program/Handwriting program/obj/Debug/Handwriting program.dll differ diff --git a/Handwriting program/Handwriting program/obj/Debug/Handwriting program.pdb b/Handwriting program/Handwriting program/obj/Debug/Handwriting program.pdb index b9cda3d..4721f6e 100644 Binary files a/Handwriting program/Handwriting program/obj/Debug/Handwriting program.pdb and b/Handwriting program/Handwriting program/obj/Debug/Handwriting program.pdb differ diff --git a/Handwriting program/Handwriting program/obj/Debug/TempPE/.justforgithub b/Handwriting program/Handwriting program/obj/Debug/TempPE/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Release/.justforgithub b/Handwriting program/Handwriting program/obj/Release/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/Handwriting program/Handwriting program/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e086095 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.FileListAbsolute.txt b/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f3a7e56 --- /dev/null +++ b/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\bin\Release\Handwriting program.dll.config +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\bin\Release\Handwriting program.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\bin\Release\Handwriting program.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting_program.Form1.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting_program.Handwriting.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting_program.Properties.Resources.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting program.csproj.GenerateResource.Cache +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting program.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\Handwriting program\Handwriting program\obj\Release\Handwriting program.pdb diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.GenerateResource.Cache b/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.GenerateResource.Cache new file mode 100644 index 0000000..c24b036 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting program.csproj.GenerateResource.Cache differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting program.dll b/Handwriting program/Handwriting program/obj/Release/Handwriting program.dll new file mode 100644 index 0000000..496f949 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting program.dll differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting program.pdb b/Handwriting program/Handwriting program/obj/Release/Handwriting program.pdb new file mode 100644 index 0000000..2a6c2d4 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting program.pdb differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Form1.resources b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Form1.resources differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Handwriting.resources b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Handwriting.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Handwriting.resources differ diff --git a/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Properties.Resources.resources b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Properties.Resources.resources new file mode 100644 index 0000000..7d8e885 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/Handwriting_program.Properties.Resources.resources differ diff --git a/Handwriting program/Handwriting program/obj/Release/TempPE/.justforgithub b/Handwriting program/Handwriting program/obj/Release/TempPE/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Release/TempPE/Properties.Resources.Designer.cs.dll b/Handwriting program/Handwriting program/obj/Release/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..bfa0bb1 Binary files /dev/null and b/Handwriting program/Handwriting program/obj/Release/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Handwriting program/Handwriting program/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..818433e --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/MSGer.tk/.justforgithub b/MSGer.tk/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/CurrentUser.cs b/MSGer.tk/CurrentUser.cs index 1ce0617..da33670 100644 --- a/MSGer.tk/CurrentUser.cs +++ b/MSGer.tk/CurrentUser.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Net; @@ -15,7 +17,7 @@ namespace MSGer.tk get { if (!Storage.LoggedInSettings.ContainsKey("currentuser_userid")) - Storage.LoggedInSettings.Add("currentuser_userid", "0"); + return 0; //2015.06.25. - Nincs bejelentkezve return Int32.Parse(Storage.LoggedInSettings["currentuser_userid"]); } set @@ -48,11 +50,11 @@ namespace MSGer.tk { get { - return Language.FromString(Storage.Settings["lang"]); + return Language.CurrentLanguage; //2015.05.16. } set { - Storage.Settings["lang"] = value.ToString(); + Language.CurrentLanguage = value; //2015.05.16. } } public static string Message @@ -131,7 +133,6 @@ namespace MSGer.tk SendUpdate(); } } - //public static IPAddress IP; public static List IPs; public static string[] Keys { //2014.09.08-09. @@ -171,7 +172,7 @@ namespace MSGer.tk Storage.LoggedInSettings["currentuser_keys"] = value.ToString(); } } - public static int PicUpdateTime + public static double PicUpdateTime //2015.06.06. - int-->double { get { @@ -186,42 +187,65 @@ namespace MSGer.tk Storage.LoggedInSettings["currentuser_picupdatetime"] = value.ToString(); } } + + public static int Port; //2015.05.24. + public static bool SendChanges = false; public static void SendUpdate() { //2014.08.30. - /* - * CurrentUser.SendUpdate() - * Bármi változás történik, elküldi mindenkinek - */ if (!SendChanges) return; - string retstr = ""; - retstr += UserID + "_name=" + Name + "\n"; - retstr += UserID + "_message=" + Message + "\n"; - retstr += UserID + "_state=" + State + "\n"; - retstr += UserID + "_username=" + UserName + "\n"; - retstr += UserID + "_email=" + Email + "\n"; - retstr += UserID + "_ispartner=" + false + "\n"; //Ellenőrizze le, amikor megkapja - retstr += UserID + "_lastupdate=" + Program.DateTimeToUnixTime(DateTime.Now); - retstr += UserID + "_picupdatetime=" + PicUpdateTime; - //while (true) - //{ - //byte[][] resp = Networking.SendUpdate(Networking.UpdateType.ListUpdate, Encoding.Unicode.GetBytes(retstr), false); - //bool fine = false; //Elvileg így az event működésekor is tudja használni, és utána ha minden rendben, akkor törli az objectet - Networking.SendUpdateInThread(Networking.UpdateType.ListUpdate, Encoding.Unicode.GetBytes(retstr), null); - /*(e, resp) => - { - if (resp == null || resp.Length == 0) - fine = true; - foreach (var item in resp) //Ha sehonnan nem kapott választ (egy perc után), újrapróbálkozik - { - if (Networking.ParsePacket(item).Data[0] == 0x01) //2014.09.19. - fine = true; - }*/ - /*if (fine) - break;*/ - //} + List retstr = new List(); + retstr.Add(UserID + "_name=" + Name); + retstr.Add(UserID + "_message=" + Message); + retstr.Add(UserID + "_state=" + State); + retstr.Add(UserID + "_username=" + UserName); + retstr.Add(UserID + "_email=" + Email); + retstr.Add(UserID + "_ispartner=" + false); //Ellenőrizze le, amikor megkapja + retstr.Add(UserID + "_lastupdate=" + Program.DateTimeToUnixTime(DateTime.Now)); + retstr.Add(UserID + "_picupdatetime=" + PicUpdateTime); + var task = new Networking.PacketSender(new Networking.PDListUpdate(retstr.ToArray())).SendAsync(); + } + + private static Image image; + public static Image Image + { //2015.06.06. + get + { + if (image == null) + { + if (!Directory.Exists("pictures")) + Directory.CreateDirectory("pictures"); + string[] files = Directory.GetFiles("pictures", UserID + ".*"); + if (files.Length > 0) + image = Program.LoadImageFromFile(files[0]); + else + image = UserInfo.NoImage.Clone() as Image; //Ugyanaz, mint a Properties.Resources.noimage + } + return image; + } + set + { + if (image != null) + image.Dispose(); + image = value; + string[] files = Directory.GetFiles("pictures", UserID + ".*"); + foreach (string file in files) + { + if (Path.GetExtension(file) != ".png") + File.Delete(file); + } + image.Save("pictures\\" + UserID + ".png", ImageFormat.Png); + PicUpdateTime = Program.DateTimeToUnixTime(DateTime.Now); + var tmp = UserInfo.Select(CurrentUser.UserID); + if (tmp != null) + { + tmp.Image = value; + tmp.PicUpdateTime = PicUpdateTime; + } + SendUpdate(); + } } } } diff --git a/MSGer.tk/ErrorHandling_REMOVE.cs b/MSGer.tk/ErrorHandling_REMOVE.cs new file mode 100644 index 0000000..bf6f49c --- /dev/null +++ b/MSGer.tk/ErrorHandling_REMOVE.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + class ErrorHandling + { //TO!DO + /*public static void FormError(Form fname, Exception e) + { + MessageBox.Show(e.GetType().ToString()); + if (fname == Program.MainF) + { + switch (e.GetType().ToString()) + { + default: + MessageBox.Show("Ismeretlen hiba történt (" + e.GetType().ToString() + ")!\n\nForrás: " + e.Source + "\nA hibaüzenet: \n" + e.Message + "\nEnnél a műveletnél: " + e.TargetSite); + break; + } + } + else if(fname==MainForm.LoginDialog) + { + switch (e.GetType().ToString()) + { + default: + MessageBox.Show("Ismeretlen hiba történt (" + e.GetType().ToString() + ")!\n\nForrás: " + e.Source + "\nA hibaüzenet: \n" + e.Message + "\nEnnél a műveletnél: " + e.TargetSite); + break; + } + } + }*/ + } +} diff --git a/MSGer.tk/Forms/.justforgithub b/MSGer.tk/Forms/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Forms/AboutBox1.Designer.cs b/MSGer.tk/Forms/AboutBox1.Designer.cs new file mode 100644 index 0000000..f3a0e83 --- /dev/null +++ b/MSGer.tk/Forms/AboutBox1.Designer.cs @@ -0,0 +1,190 @@ +namespace MSGer.tk +{ + partial class AboutBox1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox1)); + this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.logoPictureBox = new System.Windows.Forms.PictureBox(); + this.labelProductName = new System.Windows.Forms.Label(); + this.labelVersion = new System.Windows.Forms.Label(); + this.labelCopyright = new System.Windows.Forms.Label(); + this.labelLicenseLink = new System.Windows.Forms.LinkLabel(); + this.textBoxDescription = new System.Windows.Forms.TextBox(); + this.okButton = new System.Windows.Forms.Button(); + this.tableLayoutPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); + this.SuspendLayout(); + // + // tableLayoutPanel + // + this.tableLayoutPanel.ColumnCount = 2; + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); + this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); + this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); + this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); + this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); + this.tableLayoutPanel.Controls.Add(this.labelLicenseLink, 1, 3); + this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); + this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); + this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); + this.tableLayoutPanel.Name = "tableLayoutPanel"; + this.tableLayoutPanel.RowCount = 6; + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); + this.tableLayoutPanel.TabIndex = 0; + // + // logoPictureBox + // + this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); + this.logoPictureBox.Location = new System.Drawing.Point(3, 3); + this.logoPictureBox.Name = "logoPictureBox"; + this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); + this.logoPictureBox.Size = new System.Drawing.Size(131, 259); + this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.logoPictureBox.TabIndex = 12; + this.logoPictureBox.TabStop = false; + // + // labelProductName + // + this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelProductName.Location = new System.Drawing.Point(143, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelProductName.Name = "labelProductName"; + this.labelProductName.Size = new System.Drawing.Size(271, 17); + this.labelProductName.TabIndex = 19; + this.labelProductName.Text = "Product Name"; + this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelVersion + // + this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelVersion.Location = new System.Drawing.Point(143, 26); + this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); + this.labelVersion.Name = "labelVersion"; + this.labelVersion.Size = new System.Drawing.Size(271, 17); + this.labelVersion.TabIndex = 0; + this.labelVersion.Text = "Version"; + this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelCopyright + // + this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelCopyright.Location = new System.Drawing.Point(143, 52); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCopyright.Name = "labelCopyright"; + this.labelCopyright.Size = new System.Drawing.Size(271, 17); + this.labelCopyright.TabIndex = 21; + this.labelCopyright.Text = "Copyright"; + this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelLicenseLink + // + this.labelLicenseLink.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelLicenseLink.LinkColor = System.Drawing.Color.Blue; + this.labelLicenseLink.Location = new System.Drawing.Point(143, 78); + this.labelLicenseLink.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelLicenseLink.MaximumSize = new System.Drawing.Size(0, 17); + this.labelLicenseLink.Name = "labelLicenseLink"; + this.labelLicenseLink.Size = new System.Drawing.Size(271, 17); + this.labelLicenseLink.TabIndex = 22; + this.labelLicenseLink.TabStop = true; + this.labelLicenseLink.Text = "License Link"; + this.labelLicenseLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.labelLicenseLink.VisitedLinkColor = System.Drawing.Color.Blue; + this.labelLicenseLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.labelLicenseLink_LinkClicked); + // + // textBoxDescription + // + this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBoxDescription.Location = new System.Drawing.Point(143, 107); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.textBoxDescription.Multiline = true; + this.textBoxDescription.Name = "textBoxDescription"; + this.textBoxDescription.ReadOnly = true; + this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBoxDescription.Size = new System.Drawing.Size(271, 126); + this.textBoxDescription.TabIndex = 23; + this.textBoxDescription.TabStop = false; + this.textBoxDescription.Text = "Description"; + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.okButton.Location = new System.Drawing.Point(339, 239); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 24; + this.okButton.Text = "&OK"; + // + // AboutBox1 + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(435, 283); + this.Controls.Add(this.tableLayoutPanel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AboutBox1"; + this.Padding = new System.Windows.Forms.Padding(9); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "AboutBox1"; + this.tableLayoutPanel.ResumeLayout(false); + this.tableLayoutPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; + private System.Windows.Forms.PictureBox logoPictureBox; + private System.Windows.Forms.Label labelProductName; + private System.Windows.Forms.Label labelVersion; + private System.Windows.Forms.Label labelCopyright; + private System.Windows.Forms.TextBox textBoxDescription; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.LinkLabel labelLicenseLink; + } +} diff --git a/MSGer.tk/Forms/AboutBox1.cs b/MSGer.tk/Forms/AboutBox1.cs new file mode 100644 index 0000000..4e7c0c5 --- /dev/null +++ b/MSGer.tk/Forms/AboutBox1.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + partial class AboutBox1 : ThemedForms + { + public AboutBox1() + { + InitializeComponent(); + this.Text = String.Format(Language.Translate(Language.StringID.About), AssemblyTitle); + this.labelProductName.Text = AssemblyProduct; + this.labelVersion.Text = String.Format(Language.Translate(Language.StringID.About_Version), AssemblyVersion); + this.labelCopyright.Text = AssemblyCopyright; + + labelLicenseLink.Text = "https://www.gnu.org/copyleft/gpl.html"; //2014.04.18. - Frissitve: 2014.04.25. + List desc = new List(); //2014.04.18. + desc.Add(Language.Translate(Language.StringID.About_Programmer)); //2014.04.18. + desc.Add("SzNP"); + desc.Add("http://sznp.tk"); + desc.Add(""); + desc.Add(Language.Translate(Language.StringID.About_SpecialThanks)); + desc.Add("Jonathan Kay"); + desc.Add("http://messengergeek.com"); + desc.Add(Language.Translate(Language.StringID.About_SpecThanks1)); + desc.Add(""); + desc.Add(Language.Translate(Language.StringID.About_SpecThanks2)); + desc.Add(""); + desc.Add("Allen Anderson"); + desc.Add("http://www.codeproject.com/Articles/4012/C-List-View-v"); + desc.Add(Language.Translate(Language.StringID.About_SpecThanks3)); + desc.Add(""); + desc.Add("Khendys Gordon"); + desc.Add("http://www.codeproject.com/Articles/4544/Insert-Plain-Text-and-Images-into-RichTextBox-at-R"); + desc.Add(Language.Translate(Language.StringID.About_SpecThanks4)); + textBoxDescription.Lines = desc.ToArray(); + } + + #region Assembly Attribute Accessors + + public string AssemblyTitle + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); + if (attributes.Length > 0) + { + AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; + if (titleAttribute.Title != "") + { + return titleAttribute.Title; + } + } + return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + } + } + + public string AssemblyVersion + { + get + { + return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + } + } + + public string AssemblyDescription + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyDescriptionAttribute)attributes[0]).Description; + } + } + + public string AssemblyProduct + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyProductAttribute)attributes[0]).Product; + } + } + + public string AssemblyCopyright + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + } + + public string AssemblyCompany + { + get + { + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); + if (attributes.Length == 0) + { + return ""; + } + return ((AssemblyCompanyAttribute)attributes[0]).Company; + } + } + #endregion + + private void labelLicenseLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(labelLicenseLink.Text); + } + } +} diff --git a/MSGer.tk/Forms/AboutBox1.resx b/MSGer.tk/Forms/AboutBox1.resx new file mode 100644 index 0000000..e3289f3 --- /dev/null +++ b/MSGer.tk/Forms/AboutBox1.resx @@ -0,0 +1,604 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAHgAAAEGCAIAAAAhWcaAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAb5JJREFUeF7tvQdY + VHfa/s91/d/fu282sUUFpp2ZoUvvvYuCgl0UUbChqIiiiCiCSpUq0qU3aYqFpmJvYC8xGqOJJYkxpmd3 + s+u+u8m+//t7vjPHwwwYk01RN9/ruXCknvOZ+9zP/ZyZOaMhLBOKykWiCpG4SiyplTD1DNPISFuk8t1y + +T65TpeOTreO7hFd3eO6eif19E6xhRvH9PSO6Ol26+ru19Vt19Xdp6uzW0dnp45Os45Oo45OvY5OnY4s + Q8bMYUSWopSUlMuXL3/77bd/+9vf/v73v//v//7vP/7xj3/+85/ffffd999//y92/d+rvljQZSJxuVhS + IZFUSpgqRlojldZKZTtk8ia5vEUub5Xr7NXR7dTVPaALsuBLKK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bUXf8x1kCFe + RAi+fmHBXJBQceH/ZAmrLI2NG5ZtSojYnLA8cWNk0iZMcTBfVrww39Q16akxmelrszJiczLXbc1az7rw + hvzchIJtG4vyNxcXIBcnbS9OKStBpZHX1ZamV5anV8GRKzNrq5AuiJZRVMsNdag8pTv/hykaVvujroPM + 91++fqmEod/fJdzv0khPjc5Ii87YsiZzy5qs9LXZGcgPsax44b/Egql+C/I2FRdAwokl5BWJSaXF5EW1 + ZcSOU1k73gI7plftUGi5WqHl+pqtqN8VTd79DYu6LTRLJzcqW9gup1yEBxXxcv77u36fZ2nkEtnG5W3d + gMrPjS/YllDAXleILaLikkIU4gR9gXhK2fYU1osVV+0gWuZdgYZkjCrk5d8VraZovmCpZlVki6WiXCzF + 3fT7eu6lUZi3EUUlzIqXFO914YprHKCe55pKvyt6QEWzMUEhWCyFYtmluC9+Xz/H0uAkrHJ1A2X1fwWa + 3xX9oxWtAP77+oXXz3CVsN8V/buiX6D1u6J/V/SrtX5X9O+KfrXW74r+XdGv0vq///v/AT08VKulG+4s + AAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/MSGer.tk/Forms/AddPartner.Designer.cs b/MSGer.tk/Forms/AddPartner.Designer.cs new file mode 100644 index 0000000..dd0f39c --- /dev/null +++ b/MSGer.tk/Forms/AddPartner.Designer.cs @@ -0,0 +1,175 @@ +namespace MSGer.tk +{ + partial class AddPartner + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + GlacialComponents.Controls.GLColumn glColumn2 = new GlacialComponents.Controls.GLColumn(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.nameText = new System.Windows.Forms.TextBox(); + this.searchbtn = new System.Windows.Forms.Button(); + this.glacialList1 = new GlacialComponents.Controls.GlacialList(); + this.gobtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.ForeColor = System.Drawing.Color.Blue; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(174, 25); + this.label1.TabIndex = 0; + this.label1.Text = "Ismerős felvétele"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label2.ForeColor = System.Drawing.Color.Black; + this.label2.Location = new System.Drawing.Point(18, 86); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(174, 16); + this.label2.TabIndex = 1; + this.label2.Text = "Név/E-mail/Felhasználónév"; + // + // nameText + // + this.nameText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nameText.Location = new System.Drawing.Point(18, 106); + this.nameText.Name = "nameText"; + this.nameText.Size = new System.Drawing.Size(270, 20); + this.nameText.TabIndex = 2; + // + // searchbtn + // + this.searchbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.searchbtn.Location = new System.Drawing.Point(297, 104); + this.searchbtn.Name = "searchbtn"; + this.searchbtn.Size = new System.Drawing.Size(75, 23); + this.searchbtn.TabIndex = 3; + this.searchbtn.Text = "Keresés"; + this.searchbtn.UseVisualStyleBackColor = true; + this.searchbtn.Click += new System.EventHandler(this.searchbtn_Click); + // + // glacialList1 + // + this.glacialList1.AllowColumnResize = true; + this.glacialList1.AllowMultiselect = false; + this.glacialList1.AlternateBackground = System.Drawing.Color.DarkGreen; + this.glacialList1.AlternatingColors = false; + this.glacialList1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.glacialList1.AutoHeight = true; + this.glacialList1.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.glacialList1.BackgroundStretchToFit = true; + glColumn2.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn2.CheckBoxes = false; + glColumn2.ImageIndex = -1; + glColumn2.Name = "UserName"; + glColumn2.NumericSort = false; + glColumn2.Text = "Felhasználónév"; + glColumn2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + glColumn2.Width = 200; + this.glacialList1.Columns.AddRange(new GlacialComponents.Controls.GLColumn[] { + glColumn2}); + this.glacialList1.ControlStyle = GlacialComponents.Controls.GLControlStyles.Normal; + this.glacialList1.FullRowSelect = true; + this.glacialList1.GridColor = System.Drawing.Color.LightGray; + this.glacialList1.GridLines = GlacialComponents.Controls.GLGridLines.gridBoth; + this.glacialList1.GridLineStyle = GlacialComponents.Controls.GLGridLineStyles.gridSolid; + this.glacialList1.GridTypes = GlacialComponents.Controls.GLGridTypes.gridOnExists; + this.glacialList1.HeaderHeight = 22; + this.glacialList1.HeaderVisible = true; + this.glacialList1.HeaderWordWrap = false; + this.glacialList1.HotColumnTracking = false; + this.glacialList1.HotItemTracking = true; + this.glacialList1.HotTrackingColor = System.Drawing.Color.LightGray; + this.glacialList1.HoverEvents = false; + this.glacialList1.HoverTime = 1; + this.glacialList1.ImageList = null; + this.glacialList1.ItemHeight = 17; + this.glacialList1.ItemWordWrap = false; + this.glacialList1.Location = new System.Drawing.Point(18, 152); + this.glacialList1.Name = "glacialList1"; + this.glacialList1.Selectable = true; + this.glacialList1.SelectedTextColor = System.Drawing.Color.White; + this.glacialList1.SelectionColor = System.Drawing.Color.DarkBlue; + this.glacialList1.ShowBorder = true; + this.glacialList1.ShowFocusRect = false; + this.glacialList1.Size = new System.Drawing.Size(354, 272); + this.glacialList1.SortType = GlacialComponents.Controls.SortTypes.InsertionSort; + this.glacialList1.SuperFlatHeaderColor = System.Drawing.Color.White; + this.glacialList1.TabIndex = 4; + this.glacialList1.Text = "glacialList1"; + this.glacialList1.Click += new System.EventHandler(this.glacialList1_Click); + // + // gobtn + // + this.gobtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.gobtn.Location = new System.Drawing.Point(297, 427); + this.gobtn.Name = "gobtn"; + this.gobtn.Size = new System.Drawing.Size(75, 23); + this.gobtn.TabIndex = 5; + this.gobtn.Text = "Felvétel"; + this.gobtn.UseVisualStyleBackColor = true; + this.gobtn.Click += new System.EventHandler(this.gobtn_Click); + // + // AddPartner + // + this.AcceptButton = this.searchbtn; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.LightSkyBlue; + this.ClientSize = new System.Drawing.Size(384, 462); + this.Controls.Add(this.gobtn); + this.Controls.Add(this.glacialList1); + this.Controls.Add(this.searchbtn); + this.Controls.Add(this.nameText); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "AddPartner"; + this.Text = "Ismerős felvétele"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox nameText; + private System.Windows.Forms.Button searchbtn; + private GlacialComponents.Controls.GlacialList glacialList1; + private System.Windows.Forms.Button gobtn; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/AddPartner.cs b/MSGer.tk/Forms/AddPartner.cs new file mode 100644 index 0000000..862f1de --- /dev/null +++ b/MSGer.tk/Forms/AddPartner.cs @@ -0,0 +1,66 @@ +using GlacialComponents.Controls; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class AddPartner : ThemedForms + { + public AddPartner() + { + InitializeComponent(); + this.Text = Language.Translate(Language.StringID.AddContact); + label1.Text = Language.Translate(Language.StringID.AddContact); + label2.Text = Language.Translate(Language.StringID.AddContact_NameEmail); + searchbtn.Text = Language.Translate(Language.StringID.AddContact_Search); + glacialList1.Columns[0].Text = Language.Translate(Language.StringID.UserName); + gobtn.Text = Language.Translate(Language.StringID.Add); + } + + List FoundUsers = new List(); + + private void searchbtn_Click(object sender, EventArgs e) + { + glacialList1.Items.Clear(); + foreach (var tmp in UserInfo.KnownUsers) + { + if ((tmp.UserName.Contains(nameText.Text) || tmp.Name.Contains(nameText.Text) || tmp.UserID.ToString() == nameText.Text) && !FoundUsers.Contains(tmp)) + { + glacialList1.Items.Add(tmp.UserName); + + FoundUsers.Add(tmp); + } + } + } + + private void glacialList1_Click(object sender, EventArgs e) + { + int item = glacialList1.HotItemIndex; + if (item >= glacialList1.Items.Count) + return; + //2014.04.18. - Partnerinformáció mutatása + //2014.08.16. - Megvalósítás + if (FoundUsers.Count < item) + (new PartnerInformation(FoundUsers[item])).ShowDialog(); + } + + private void gobtn_Click(object sender, EventArgs e) + { + if (glacialList1.SelectedItems.Count == 0 || FoundUsers.Count == 0) + return; + string username = ((GLItem)glacialList1.SelectedItems[0]).Text; + string response = Networking.SendRequest(Networking.RequestType.AddUser, username, 0, true); + if (response == "Success") + MessageBox.Show("Felhasználó felvéve az ismerőseid közé."); + else + MessageBox.Show("Nem sikerült felvenni a felhasználót az ismerőseid közé.\nLehet, hogy már felvetted, vagy valami hiba történt.\n(" + response + ")"); + } + } +} diff --git a/MSGer.tk/Forms/AddPartner.resx b/MSGer.tk/Forms/AddPartner.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/AddPartner.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/BeforeLogin.Designer.cs b/MSGer.tk/Forms/BeforeLogin.Designer.cs new file mode 100644 index 0000000..cbd9cc2 --- /dev/null +++ b/MSGer.tk/Forms/BeforeLogin.Designer.cs @@ -0,0 +1,68 @@ +namespace MSGer.tk +{ + partial class BeforeLogin + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(0, 24); + this.label1.TabIndex = 0; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // BeforeLogin + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(362, 53); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.Name = "BeforeLogin"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "BeforeLogin"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.BeforeLogin_FormClosed); + this.TextChanged += new System.EventHandler(this.BeforeLogin_TextChanged); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/BeforeLogin.cs b/MSGer.tk/Forms/BeforeLogin.cs new file mode 100644 index 0000000..b38ee3f --- /dev/null +++ b/MSGer.tk/Forms/BeforeLogin.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class BeforeLogin : ThemedForms + { + private static BeforeLogin mInstance; + private static bool done = false; + private static string ttext { get; set; } + public static void Create() + { + var t = new System.Threading.Thread(() => + { + Thread.Sleep(1000); + if (done) + return; + mInstance = new BeforeLogin(); + mInstance.FormClosed += (s, e) => mInstance = null; + Application.Run(mInstance); + }); + t.SetApartmentState(System.Threading.ApartmentState.STA); + t.IsBackground = true; + t.Start(); + } + + public static void Destroy() + { + done = true; + if (mInstance != null) mInstance.Invoke(new Action(() => mInstance.Close())); + } + + public static void SetText(string text) + { + if (mInstance != null) mInstance.Invoke((MethodInvoker)delegate { mInstance.Text = text; }); + ttext = text; + } + + private BeforeLogin() + { //2014.09.06. + InitializeComponent(); + Text = ttext; + } + + private void BeforeLogin_TextChanged(object sender, EventArgs e) + { + label1.Text = this.Text; + } + + private void BeforeLogin_FormClosed(object sender, FormClosedEventArgs e) + { + if (!done) + Program.Exit(); + } + } +} diff --git a/MSGer.tk/Forms/BeforeLogin.resx b/MSGer.tk/Forms/BeforeLogin.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/BeforeLogin.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/ChatForm.Designer.cs b/MSGer.tk/Forms/ChatForm.Designer.cs new file mode 100644 index 0000000..80c8738 --- /dev/null +++ b/MSGer.tk/Forms/ChatForm.Designer.cs @@ -0,0 +1,49 @@ +namespace MSGer.tk +{ + partial class ChatForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // ChatForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(564, 422); + this.Name = "ChatForm"; + this.Text = "Beszélgetés"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ChatForm_FormClosing); + this.ResumeLayout(false); + + } + + #endregion + + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/ChatForm.cs b/MSGer.tk/Forms/ChatForm.cs new file mode 100644 index 0000000..58f4978 --- /dev/null +++ b/MSGer.tk/Forms/ChatForm.cs @@ -0,0 +1,36 @@ +using Khendys.Controls; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using HdSystemLibrary.IO; + +namespace MSGer.tk +{ + public partial class ChatForm : ThemedForms + { + public ChatForm() + { + InitializeComponent(); + //Amint létrehozom, ez a kód lefut - Nem számit, hogy megjelenik-e + + this.Text = Language.Translate(Language.StringID.Chat_Title, this); + } + + private void ChatForm_FormClosing(object sender, FormClosingEventArgs e) + { + + } + } +} diff --git a/MSGer.tk/Forms/ChatForm.resx b/MSGer.tk/Forms/ChatForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/ChatForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/ChatPanel.Designer.cs b/MSGer.tk/Forms/ChatPanel.Designer.cs new file mode 100644 index 0000000..24dd6c6 --- /dev/null +++ b/MSGer.tk/Forms/ChatPanel.Designer.cs @@ -0,0 +1,349 @@ +namespace MSGer.tk +{ + partial class ChatPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChatPanel)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.partnerName = new Khendys.Controls.ExRichTextBox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.button1 = new System.Windows.Forms.Button(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.recentMsgTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.messageTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.masterPanel = new System.Windows.Forms.Panel(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.recentMsgTextBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.messageTextBox)).BeginInit(); + this.menuStrip1.SuspendLayout(); + this.masterPanel.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(169, 363); + this.panel1.TabIndex = 0; + // + // panel2 + // + this.panel2.Controls.Add(this.partnerName); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(391, 39); + this.panel2.TabIndex = 0; + // + // partnerName + // + this.partnerName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.partnerName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.partnerName.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.partnerName.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.partnerName.ForeColor = System.Drawing.Color.Black; + this.partnerName.HiglightColor = Khendys.Controls.RtfColor.White; + this.partnerName.Location = new System.Drawing.Point(9, 7); + this.partnerName.Multiline = false; + this.partnerName.Name = "partnerName"; + this.partnerName.ReadOnly = true; + this.partnerName.Size = new System.Drawing.Size(337, 25); + this.partnerName.TabIndex = 3; + this.partnerName.Text = "partnerName"; + this.partnerName.TextColor = Khendys.Controls.RtfColor.Black; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(313, 122); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "handwriting"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.panel1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(564, 363); + this.splitContainer1.SplitterDistance = 169; + this.splitContainer1.TabIndex = 7; + this.splitContainer1.TabStop = false; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.progressBar1); + this.splitContainer2.Panel2.Controls.Add(this.button1); + this.splitContainer2.Panel2.Controls.Add(this.messageTextBox); + this.splitContainer2.Size = new System.Drawing.Size(391, 363); + this.splitContainer2.SplitterDistance = 203; + this.splitContainer2.TabIndex = 2; + this.splitContainer2.TabStop = false; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.panel2); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.recentMsgTextBox); + this.splitContainer3.Size = new System.Drawing.Size(391, 203); + this.splitContainer3.SplitterDistance = 39; + this.splitContainer3.TabIndex = 2; + this.splitContainer3.TabStop = false; + // + // recentMsgTextBox + // + this.recentMsgTextBox.AcceptsTab = false; + this.recentMsgTextBox.AllowMacroRecording = false; + this.recentMsgTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.recentMsgTextBox.AutoCompleteBracketsList = new char[] { + '(', + ')', + '{', + '}', + '[', + ']', + '\"', + '\"', + '\'', + '\''}; + this.recentMsgTextBox.AutoIndent = false; + this.recentMsgTextBox.AutoIndentChars = false; + this.recentMsgTextBox.AutoIndentExistingLines = false; + this.recentMsgTextBox.AutoScrollMinSize = new System.Drawing.Size(0, 12); + this.recentMsgTextBox.BackBrush = null; + this.recentMsgTextBox.CharHeight = 12; + this.recentMsgTextBox.CharWidth = 7; + this.recentMsgTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; + this.recentMsgTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.recentMsgTextBox.Font = new System.Drawing.Font("Courier New", 8.25F); + this.recentMsgTextBox.IsReplaceMode = false; + this.recentMsgTextBox.Location = new System.Drawing.Point(3, 3); + this.recentMsgTextBox.Name = "recentMsgTextBox"; + this.recentMsgTextBox.Paddings = new System.Windows.Forms.Padding(0); + this.recentMsgTextBox.ReadOnly = true; + this.recentMsgTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); + this.recentMsgTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("recentMsgTextBox.ServiceColors"))); + this.recentMsgTextBox.ShowLineNumbers = false; + this.recentMsgTextBox.Size = new System.Drawing.Size(388, 157); + this.recentMsgTextBox.TabIndex = 4; + this.recentMsgTextBox.WordWrap = true; + this.recentMsgTextBox.Zoom = 100; + this.recentMsgTextBox.TextChanged += new System.EventHandler(this.recentMsgTextBox_TextChanged); + // + // progressBar1 + // + this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.progressBar1.ForeColor = System.Drawing.Color.White; + this.progressBar1.Location = new System.Drawing.Point(162, 123); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(145, 20); + this.progressBar1.Step = 1; + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.progressBar1.TabIndex = 4; + this.progressBar1.Value = 100; + this.progressBar1.Visible = false; + // + // messageTextBox + // + this.messageTextBox.AcceptsTab = false; + this.messageTextBox.AllowMacroRecording = false; + this.messageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageTextBox.AutoCompleteBracketsList = new char[] { + '(', + ')', + '{', + '}', + '[', + ']', + '\"', + '\"', + '\'', + '\''}; + this.messageTextBox.AutoIndent = false; + this.messageTextBox.AutoIndentChars = false; + this.messageTextBox.AutoIndentExistingLines = false; + this.messageTextBox.AutoScrollMinSize = new System.Drawing.Size(0, 12); + this.messageTextBox.BackBrush = null; + this.messageTextBox.CharHeight = 12; + this.messageTextBox.CharWidth = 7; + this.messageTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; + this.messageTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.messageTextBox.Font = new System.Drawing.Font("Courier New", 8.25F); + this.messageTextBox.IsReplaceMode = false; + this.messageTextBox.Location = new System.Drawing.Point(0, 2); + this.messageTextBox.Name = "messageTextBox"; + this.messageTextBox.Paddings = new System.Windows.Forms.Padding(0); + this.messageTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); + this.messageTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("messageTextBox.ServiceColors"))); + this.messageTextBox.ShowLineNumbers = false; + this.messageTextBox.Size = new System.Drawing.Size(391, 114); + this.messageTextBox.TabIndex = 3; + this.messageTextBox.WordWrap = true; + this.messageTextBox.Zoom = 100; + this.messageTextBox.TextChanged += new System.EventHandler(this.MessageTextChanged); + this.messageTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SendMessage); + // + // menuStrip1 + // + this.menuStrip1.BackgroundImage = global::MSGer.tk.Properties.Resources.Menü_2; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.menuStrip1.Size = new System.Drawing.Size(564, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // masterPanel + // + this.masterPanel.Controls.Add(this.splitContainer1); + this.masterPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.masterPanel.Location = new System.Drawing.Point(0, 24); + this.masterPanel.Name = "masterPanel"; + this.masterPanel.Size = new System.Drawing.Size(564, 363); + this.masterPanel.TabIndex = 0; + // + // ChatPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.Controls.Add(this.masterPanel); + this.Controls.Add(this.menuStrip1); + this.Name = "ChatPanel"; + this.Size = new System.Drawing.Size(564, 387); + this.Load += new System.EventHandler(this.ChatForm_Load); + this.panel2.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.recentMsgTextBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.messageTextBox)).EndInit(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.masterPanel.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + public Khendys.Controls.ExRichTextBox partnerName; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.Panel masterPanel; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private FastColoredTextBoxNS.FastColoredTextBox messageTextBox; + private FastColoredTextBoxNS.FastColoredTextBox recentMsgTextBox; + private System.Windows.Forms.ProgressBar progressBar1; + } +} diff --git a/MSGer.tk/Forms/ChatPanel.cs b/MSGer.tk/Forms/ChatPanel.cs new file mode 100644 index 0000000..f2aeb4b --- /dev/null +++ b/MSGer.tk/Forms/ChatPanel.cs @@ -0,0 +1,423 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; +using System.Net; +using System.Net.Sockets; +using HdSystemLibrary.IO; +using System.Diagnostics; +using Handwriting_program; +using FastColoredTextBoxNS; +using System.Text.RegularExpressions; + +namespace MSGer.tk +{ + public partial class ChatPanel : UserControl + { + public static List ChatWindows = new List(); + public List ChatPartners = new List(); + private string chatname = ""; + public string ChatName //2014.12.13. - A beszélgetés neve + { + get + { + return chatname; + } + set + { + chatname = value; + this.Text = chatname; + } + } + private TextBoxHelpers.GifImageStyle style; + private TextBoxHelpers.GifImageStyle styleRecent; //2015.06.16. + const string RegexSpecSymbolsPattern = @"[\^\$\[\]\(\)\.\\\*\+\|\?\{\}]"; //static-->const: 2015.07.05. + public ChatPanel() + { + InitializeComponent(); + //Amint létrehozom, ez a kód lefut - Nem számit, hogy megjelenik-e + + this.Text = Language.Translate(Language.StringID.Chat_Title, this); + button1.Text = Language.Translate(Language.StringID.Handwriting, button1); //2015.06.29. + + style = new TextBoxHelpers.GifImageStyle(messageTextBox); + styleRecent = new TextBoxHelpers.GifImageStyle(recentMsgTextBox); //2015.06.16. + foreach (var item in TextFormat.TextFormats) + { //2015.06.26. + foreach (var item2 in item.Emoticons) + { + style.ImagesByText.Add(item2.Value, item2.Image); + styleRecent.ImagesByText.Add(item2.Value, item2.Image); + } + } + style.StartAnimation(); //2015.06.16. + styleRecent.StartAnimation(); //2015.06.16. + + messageTextBox.OnTextChanged(); //2015.06.16. + recentMsgTextBox.OnTextChanged(); //2015.06.16. + recentMsgTextBox.GoEnd(); //2015.06.16. + } //TODO: A recentMsgTextBox-nál megoldani az OpenLink event-et + + private void ChatForm_Load(object sender, EventArgs e) + { + if (ChatPartners.Count == 0) + { + new ErrorHandler(ErrorType.Chat_NoPartners, new Exception()); //2015.06.04. + Close(); //2015.05.21. + return; //2015.05.21. - Ezesetben ne folytassa + } + if (ChatName.Length == 0) + { + this.Text = ""; + foreach (var item in ChatPartners) + this.Text += item.Name + ", "; + this.Text = this.Text.Remove(this.Text.Length - 2); + partnerName.Text = this.Text; + this.Text += " - " + Language.Translate(Language.StringID.Chat_Title); + } + else + { + this.Text = ChatName; + } + if (Storage.Settings[SettingType.ChatWindow] == "1") //<-- 2015.06.14. + Parent.Parent.Text = this.Text; //2014.12.22. + messageTextBox.Select(); + } + + public bool InternalMessageChange = false; + public int SelectionStart = 0; + public int SelectionLength = 0; + public int TextLength = 0; + private async void SendMessage(object sender, KeyEventArgs e) + { + //SendMessage + if (e.KeyCode != Keys.Enter || e.Shift || !messageTextBox.Visible) + return; + e.SuppressKeyPress = true; //2015.05.21. + if (messageTextBox.Text.Length == 0) + { //2015.05.21. + return; + } + messageTextBox.ReadOnly = true; + double time = Program.DateTimeToUnixTime(DateTime.Now); + if (ChatPartners.Any(entry => entry.UserID != CurrentUser.UserID) && !await Networking.SendChatMessage(this, messageTextBox.Text, time)) //UserID==CurrentUser.UserID: 2015.05.23. + MessageBox.Show(Language.Translate(Language.StringID.Networking_Alone)); + else //else: 2014.10.31. + { + recentMsgTextBox.GoEnd(); //2015.06.16. + ShowReceivedMessageT(UserInfo.Select(CurrentUser.UserID), messageTextBox.Text, time); + messageTextBox.Text = ""; + } + messageTextBox.Select(); //2014.12.13. + messageTextBox.ReadOnly = false; + } + + private void MessageTextChanged(object sender, TextChangedEventArgs e) + { + if (style == null) + return; + e.ChangedRange.ClearStyle(StyleIndex.All); + foreach (var key in style.ImagesByText.Keys) + { + string pattern = Regex.Replace(key, RegexSpecSymbolsPattern, "\\$0"); + e.ChangedRange.SetStyle(style, pattern); + } + } + + private void OpenLink(object sender, LinkClickedEventArgs e) + { + Process.Start(e.LinkText); + } + + public static ChatPanel GetChatPanelByUsers(IEnumerable users) //2014.08.08. - IEnumerable: 2014.08.16. - GetChatFormByUsers --> GetChatPanelByUsers: 2015.05.15. + { + if (users.Any(entry => entry == null)) + return null; //2015.05.15. + int i; + for (i = 0; i < ChatWindows.Count; i++) + { + UserInfo[] tmp = new UserInfo[ChatWindows[i].ChatPartners.Count + 1]; //2015.05.15. + ChatWindows[i].ChatPartners.CopyTo(tmp); //2015.05.15. + tmp[tmp.Length - 1] = UserInfo.Select(CurrentUser.UserID); //2015.05.15. + if (tmp.HasSameElementsAs(users)) + break; //2015.05.15. + } + return (i != ChatWindows.Count) ? ChatWindows[i] : null; + } + + private UserInfo _LastMessageUser; + private string _LastMessage; + private double _LastMessageStartTime; + + /// + /// Thread-safe + /// + /// + /// + public void ShowReceivedMessageT(UserInfo user, string message, double time) + { //2015.05.15. + this.Invoke(new Action(() => + { + if (user == _LastMessageUser && message == _LastMessage && time < _LastMessageStartTime + 1) //1000-->1: 2015.07.05. 0:35 + return; + _LastMessageUser = user; + _LastMessage = message; + _LastMessageStartTime = Program.DateTimeToUnixTime(DateTime.Now); + int index = message.IndexOf("//!img"); //2015.07.05. + int index2 = message.IndexOfAny(new char[] { ' ', '\n' }); //2015.07.05. + if (index2 == -1) //2015.07.05. + index2 = message.Length; //2015.07.05. + if (index != -1) //2015.07.05. + { + string newlines = ""; //2015.07.05. + message = message.Substring(index, index2); //2015.07.05. + if (!styleRecent.SentImagesByText.ContainsKey(message)) //2015.07.05. + message = "[Invalid image data]"; //2015.07.05. + else + for (int i = 0; i <= styleRecent.SentImagesByText[message].Height; i += (int)recentMsgTextBox.Font.GetHeight()) + newlines += "\n"; //2015.07.05. + message += newlines; //2015.07.05. + } + string txt = "\n" + ((user.UserID == CurrentUser.UserID) ? CurrentUser.Name : user.Name) + " " + Language.Translate(Language.StringID.Said) + " (" + Program.UnixTimeToDateTime(time).ToString("yyyy.MM.dd. HH:mm:ss") + "):\n" + message + "\n"; + recentMsgTextBox.AppendText(txt); + recentMsgTextBox.GoEnd(); //2015.06.16. + })); + } + private double _LastImageTime; + private UserInfo _LastImageUser; + public void ShowReceivedImageT(UserInfo user, Image image, double time) + { //2015.06.25. + this.Invoke(new Action(() => + { + if (user == _LastImageUser && time < _LastImageTime + 1) //<-- 2015.07.04. + return; + _LastImageTime = time; + _LastImageUser = user; + string txt = "\n" + ((user.UserID == CurrentUser.UserID) ? CurrentUser.Name : user.Name) + " " + Language.Translate(Language.StringID.Said) + " (" + Program.UnixTimeToDateTime(time).ToString("yyyy.MM.dd. HH:mm:ss") + "):\n"; + txt += styleRecent.AddImage(image) + "\n"; //2015.06.26. - style-->styleRecent: 2015.07.04. + for (int i = 0; i <= image.Height; i += (int)recentMsgTextBox.Font.GetHeight()) + txt += "\n"; //2015.07.04. + recentMsgTextBox.AppendText(txt); + recentMsgTextBox.GoEnd(); //2015.06.16. + })); + } + + public long ShowReceivedFileT(UserInfo user, FileInfo file, double time, long progress) + { //2015.06.30. + long prog = 0; + this.Invoke(new Action(() => + { + progressBar1.Value = (int)((progress / file.Length) * 100); + progressBar1.Visible = true; + if (progress + Networking.PDSendFile.BufferLength >= file.Length + 1) + { + progressBar1.Visible = false; + string txt = "\n" + ((user.UserID == CurrentUser.UserID) ? CurrentUser.Name : user.Name) + " " + Language.Translate(Language.StringID.FileReceived) + " (" + Program.UnixTimeToDateTime(time).ToString("yyyy.MM.dd. HH:mm:ss") + "): " + file.Name + "\n"; + recentMsgTextBox.AppendText(txt); + prog = Progress; + Progress = 0; + } + })); + return prog; + } + + public static ChatPanel Create(IEnumerable users) + { //2015.05.15. + ChatPanel cf = null; + Program.MainF.Invoke(new Action(() => //Invoke: 2015.05.16. + { + ChatPanel.ChatWindows.Add(cf = new ChatPanel()); + cf.ChatPartners.AddRange(users); + if (cf.ChatPartners.Count > 1) //2015.05.23. - Így saját magunkkal is beszélhetünk... + cf.ChatPartners.RemoveAll(entry => entry.UserID == CurrentUser.UserID); //2015.05.16. + cf.Init(); + })); + return cf; + } + + private long Progress = 0; //2015.06.30. + private FileInfo fileinfo; //2015.06.30. + public void OpenSendFile() //<-- 2015.06.30. + { + if (openFileDialog1.ShowDialog() == DialogResult.Cancel) + return; + fileinfo = new FileInfo(openFileDialog1.FileName); + + Progress = 0; //2015.06.30. + new Networking.PacketSender(new Networking.PDSendFile(ChatPartners.Select(entry => entry.UserID).ToArray(), + fileinfo, Program.DateTimeToUnixTime(DateTime.Now), 0)).SendAsync() + .ContinueWith(new Action>(SendFileContinue)); + progressBar1.Visible = true; + } + private IEnumerable SendFileIPs; //2015.06.30. + private void SendFileContinue(Task task) //<-- 2015.06.30. + { + if (task.Result.Count() == 0) + return; //2015.06.30. + if (SendFileIPs == null) + SendFileIPs = task.Result.Where(entry => ChatPartners.Any(item => item.UserID == entry.EUserID)) //2015.06.30. + .Select(entry => ((Networking.PDSendFile)entry.EData).RespIPs) //2015.06.30. + .Aggregate((entry1, entry2) => entry1.Concat(entry2)); //2015.06.30. + var pf = task.Result.FirstOrDefault(entry => ((Networking.PDSendFile)entry.EData).RespIPs.SequenceEqual(SendFileIPs)); //2015.06.30. + if (pf == null) + return; //2015.06.30. + var pd = ((Networking.PDSendFile)pf.EData); + if (pd.RProgress < Progress) //Ha a fájl fogadója le van maradva + { //2015.06.30. + Progress = pd.RProgress; + } + Progress += Networking.PDSendFile.BufferLength; //2015.06.30. + if (Progress < fileinfo.Length) + { + progressBar1.Value = (int)((Progress / fileinfo.Length) * 100); //2015.06.30. + new Networking.PacketSender(new Networking.PDSendFile(ChatPartners.Select(entry => entry.UserID).ToArray(), + fileinfo, Program.DateTimeToUnixTime(DateTime.Now), Progress)).SendAsync() + .ContinueWith(new Action>(SendFileContinue)); + } + else + { + SendFileIPs = null; //2015.06.30. + Progress = 0; //2015.06.30. + } + } + + public void Close() + { + ChatWindows.Remove(this); + if (Storage.Settings[SettingType.ChatWindow] == "0" ^ SettingsForm.ApplyingSettings) //Ha az új beállítás szerint(!) külön ablakokban kell megjeleníteni, akkor hajtsa végre + { //2014.10.31. + this.Dispose(); + if (ChatIcon != null) //Most már nem feltétlenül változik a beállítás + ChatIcon.Dispose(); + } + } + + private void Init() + { //2014.10.28. + if (Storage.Settings[SettingType.ChatWindow] == "") + Storage.Settings[SettingType.ChatWindow] = "0"; //2015.05.21. + if (Storage.Settings[SettingType.ChatWindow] == "1") + { + //ChatForm a ChatPanel-lel + var cf = new ChatForm(); + cf.Controls.Add(this); + cf.FormClosing += cf_FormClosing; + this.Dock = DockStyle.Fill; + cf.Show(); + cf.Select(); //2014.12.13. + cf.Focus(); //2015.05.16. + } + else + { + Program.MainF.Controls.Add(this); + if (ChatPartners.Count == 0) + return; //2015.05.21. - Azt várja meg, hogy a Load metódus hibát jelezzen + Program.MainF.PlaceChatIcon(this); + this.BringToFront(); + this.Show(); + } + } + + void cf_FormClosing(object sender, FormClosingEventArgs e) + { + this.Close(); + } + + internal static void ReopenChatWindows(bool settingchanged) + { + for (int i = 0; i < ChatWindows.Count; i++) + { + var tmp = ChatWindows[i].ChatPartners; + if (settingchanged) + { + if (Storage.Settings[SettingType.ChatWindow] == "0") //Ha az új beállítás szerint(!) külön ablakokban kell megjeleníteni, akkor hajtsa végre + ((Form)ChatWindows[i].Parent.Parent).Close(); //Ezzel meghívja a saját Close()-ját is + else + ChatWindows[i].Close(); + } + else + { + if (Storage.Settings[SettingType.ChatWindow] == "1") //Ha a régi beállítás szerint(!) külön ablakokban kell megjeleníteni, akkor hajtsa végre + ((Form)ChatWindows[i].Parent.Parent).Close(); //Ezzel meghívja a saját Close()-ját is + else + ChatWindows[i].Close(); + } + var tmp2 = new ChatPanel(); + tmp2.ChatPartners = tmp; + tmp2.Init(); + ChatWindows.Add(tmp2); + } + } + + public new void Show() + { + if (Storage.Settings[SettingType.ChatWindow] == "0") + { + foreach (var item in ChatWindows) + { + item.Hide(); + } + //A ChatIcon-hoz a legközelebbi helyre rakja - Vagy fedje be kb. a partnerlistát, úgyis elég nagy + this.Location = new Point(150, Program.MainF.contactList.Location.Y); + } + base.Show(); + } + + public PictureBox ChatIcon { get; set; } + + public Handwriting handw; + private void button1_Click(object sender, EventArgs e) + { + if (messageTextBox.Visible) + { + if (handw == null) + { + handw = new Handwriting(); + handw.Parent = this.splitContainer2.Panel2; + handw.Bounds = messageTextBox.Bounds; + handw.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + handw.sendbtn.Text = Language.Translate(Language.StringID.Sendbtn_Send, handw.sendbtn); + handw.sendbtn.Click += Handw_sendbtn_Click; + } + else + handw.Show(); + messageTextBox.Hide(); + } + else + { + handw.Hide(); + messageTextBox.Show(); + } + } + + async void Handw_sendbtn_Click(object sender, EventArgs e) + { + double time = Program.DateTimeToUnixTime(DateTime.Now); //2015.07.04. + await new Networking.PacketSender(new Networking.PDSendImage(ChatPartners.Select(entry => entry.UserID).ToArray(), handw.GetBitmap(), time)).SendAsync(); //2015.06.28. + ShowReceivedImageT(UserInfo.Select(CurrentUser.UserID), handw.GetBitmap(), time); //2015.07.04. + handw.Clear(); //2015.07.04. + } + + private void recentMsgTextBox_TextChanged(object sender, TextChangedEventArgs e) + { + if (style == null) + return; + e.ChangedRange.ClearStyle(StyleIndex.All); + foreach (var key in style.ImagesByText.Keys) + { + string pattern = Regex.Replace(key, RegexSpecSymbolsPattern, "\\$0"); + e.ChangedRange.SetStyle(styleRecent, pattern); + } + foreach (var key in styleRecent.SentImagesByText.Keys) + { + e.ChangedRange.SetStyle(styleRecent, key); + } + } + } +} diff --git a/MSGer.tk/Forms/ChatPanel.resx b/MSGer.tk/Forms/ChatPanel.resx new file mode 100644 index 0000000..40bd558 --- /dev/null +++ b/MSGer.tk/Forms/ChatPanel.resx @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdGYXN0Q29sb3JlZFRleHRCb3gsIFZlcnNpb249Mi4xNi4xMS4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWZiOGFhMTJiOTk0ZWY2MWIMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACJGYXN0Q29sb3JlZFRleHRCb3hOUy5TZXJ2aWNlQ29sb3JzBgAA + ACg8Q29sbGFwc2VNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxDb2xsYXBzZU1hcmtlckJh + Y2tDb2xvcj5rX19CYWNraW5nRmllbGQqPENvbGxhcHNlTWFya2VyQm9yZGVyQ29sb3I+a19fQmFja2lu + Z0ZpZWxkJjxFeHBhbmRNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkJjxFeHBhbmRNYXJrZXJC + YWNrQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxFeHBhbmRNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5n + RmllbGQEBAQEBAQUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAA + ABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5E + cmF3aW5nLkNvbG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAACAAAABfz///8UU3lzdGVtLkRy + YXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDA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b3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAACgAAAAAA + AAAAlgABAAH7/////P///woAAAAAAAAAAKQAAQAB+v////z///8KAAAAAAAAAACWAAEAAfn////8//// + CgAAAAAAAAAAjQABAAH4/////P///woAAAAAAAAAAKQAAQAB9/////z///8KAAAAAAAAAACWAAEACw== + + + + 157, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/Emoticons.Designer.cs b/MSGer.tk/Forms/Emoticons.Designer.cs new file mode 100644 index 0000000..61871c6 --- /dev/null +++ b/MSGer.tk/Forms/Emoticons.Designer.cs @@ -0,0 +1,213 @@ +namespace MSGer.tk +{ + partial class Emoticons + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.removebtn = new System.Windows.Forms.Button(); + this.domainUpDown1 = new System.Windows.Forms.DomainUpDown(); + this.addbtn = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.closebtn = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel1.BackColor = System.Drawing.Color.White; + this.flowLayoutPanel1.Location = new System.Drawing.Point(13, 66); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(228, 297); + this.flowLayoutPanel1.TabIndex = 0; + this.flowLayoutPanel1.Click += new System.EventHandler(this.flowLayoutPanel1_Click); + // + // removebtn + // + this.removebtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.removebtn.Location = new System.Drawing.Point(247, 95); + this.removebtn.Name = "removebtn"; + this.removebtn.Size = new System.Drawing.Size(124, 23); + this.removebtn.TabIndex = 2; + this.removebtn.Text = "Törlés"; + this.removebtn.UseVisualStyleBackColor = true; + this.removebtn.Click += new System.EventHandler(this.removebtn_Click); + // + // domainUpDown1 + // + this.domainUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.domainUpDown1.Location = new System.Drawing.Point(12, 40); + this.domainUpDown1.Name = "domainUpDown1"; + this.domainUpDown1.Size = new System.Drawing.Size(229, 20); + this.domainUpDown1.TabIndex = 3; + this.domainUpDown1.Text = "New pack"; + this.domainUpDown1.SelectedItemChanged += new System.EventHandler(this.domainUpDown1_SelectedItemChanged); + this.domainUpDown1.TextChanged += new System.EventHandler(this.domainUpDown1_TextChanged); + // + // addbtn + // + this.addbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.addbtn.Location = new System.Drawing.Point(247, 66); + this.addbtn.Name = "addbtn"; + this.addbtn.Size = new System.Drawing.Size(124, 23); + this.addbtn.TabIndex = 1; + this.addbtn.Text = "Hozzáadás"; + this.addbtn.UseVisualStyleBackColor = true; + this.addbtn.Click += new System.EventHandler(this.addbtn_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(60, 24); + this.label1.TabIndex = 4; + this.label1.Text = "label1"; + // + // closebtn + // + this.closebtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.closebtn.Location = new System.Drawing.Point(296, 367); + this.closebtn.Name = "closebtn"; + this.closebtn.Size = new System.Drawing.Size(75, 23); + this.closebtn.TabIndex = 5; + this.closebtn.Text = "Bezárás"; + this.closebtn.UseVisualStyleBackColor = true; + this.closebtn.Click += new System.EventHandler(this.closebtn_Click); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(247, 147); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 7; + this.button1.Text = "Módosítás"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(247, 131); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(87, 13); + this.label2.TabIndex = 8; + this.label2.Text = "Kép kiválasztása"; + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.Location = new System.Drawing.Point(247, 177); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(124, 124); + this.pictureBox1.TabIndex = 9; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(244, 314); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(43, 13); + this.label3.TabIndex = 10; + this.label3.Text = "Szöveg"; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.Location = new System.Drawing.Point(247, 331); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(124, 20); + this.textBox1.TabIndex = 11; + this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave); + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.Filter = "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|All Image Types|" + + "*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff"; + this.openFileDialog1.RestoreDirectory = true; + // + // Emoticons + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(383, 402); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.button1); + this.Controls.Add(this.closebtn); + this.Controls.Add(this.label1); + this.Controls.Add(this.domainUpDown1); + this.Controls.Add(this.removebtn); + this.Controls.Add(this.addbtn); + this.Controls.Add(this.flowLayoutPanel1); + this.Name = "Emoticons"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Emoticons"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Emoticons_FormClosing); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button removebtn; + private System.Windows.Forms.DomainUpDown domainUpDown1; + private System.Windows.Forms.Button addbtn; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button closebtn; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/Emoticons.cs b/MSGer.tk/Forms/Emoticons.cs new file mode 100644 index 0000000..2a50cf0 --- /dev/null +++ b/MSGer.tk/Forms/Emoticons.cs @@ -0,0 +1,212 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class Emoticons : ThemedForms //ThemedForms: 2015.07.05. + { //2015.06.06. + public Emoticons() + { + InitializeComponent(); + label1.Text = Language.Translate(Language.StringID.Emoticons); //TODO: A ...-t a menüknél mindig adja hozzá + this.Text = label1.Text; + addbtn.Text = Language.Translate(Language.StringID.Add); //TODO: A teljesen megegyező string-eket jelezze + removebtn.Text = Language.Translate(Language.StringID.Remove); + closebtn.Text = Language.Translate(Language.StringID.Close); + label2.Text = Language.Translate(Language.StringID.SelectImage); + button1.Text = Language.Translate(Language.StringID.Modify); + label3.Text = Language.Translate(Language.StringID.Text); + domainUpDown1.Items.Clear(); + domainUpDown1.Items.AddRange(TextFormat.TextFormats); + if (domainUpDown1.Items.Count == 0) + domainUpDown1.SelectedIndex = -1; + else + domainUpDown1.SelectedIndex = 0; + SelectedTextFormat = domainUpDown1.SelectedIndex; + } + + private void domainUpDown1_SelectedItemChanged(object sender, EventArgs e) + { + SelectedTextFormat = domainUpDown1.SelectedIndex; + } + + private int selectedtextformat; + private int SelectedTextFormat + { + get + { + return selectedtextformat; + } + set + { + selectedtextformat = value; + if (value == -1) + return; + flowLayoutPanel1.Controls.Clear(); + SelectedEmoticon = 0; + if (TextFormat.TextFormats.Count > 0) + flowLayoutPanel1.Controls.AddRange(TextFormat.TextFormats[value].Emoticons.Select(entry => new PictureBox { Image = entry.Clone() as Image }).ToArray()); + int i = 0; + foreach (PictureBox pictbox in flowLayoutPanel1.Controls) + { + pictbox.Click += Emoticons_Click; + pictbox.Tag = i; + pictbox.Size = pictbox.Image.Size; + i++; + } + } + } + + void Emoticons_Click(object sender, EventArgs e) + { + SelectedEmoticon = (int)(sender as Control).Tag; + } + + private int selectedemoticon; + private int SelectedEmoticon + { + get + { + return selectedemoticon; + } + set + { + SaveEmoticonIfChanged(); + if (value == selectedemoticon) + return; + if (value >= flowLayoutPanel1.Controls.Count) + { + pictureBox1.Image = null; + initialtext = ""; + textBox1.Text = ""; + } + else + { + pictureBox1.Image = (flowLayoutPanel1.Controls[value] as PictureBox).Image; + initialtext = TextFormat.TextFormats[SelectedTextFormat].Emoticons[value].Value; + } + textBox1.Text = initialtext; + selectedemoticon = value; + } + } + + private bool imagechanged = false; + private void SaveEmoticonIfChanged() + { + bool save = false; + if (pictureBox1.Image == null || textBox1.Text == "") + return; + if (SelectedEmoticon >= flowLayoutPanel1.Controls.Count) + { + flowLayoutPanel1.Controls.Add(new PictureBox { Tag = flowLayoutPanel1.Controls.Count, Image = pictureBox1.Image.Clone() as Image, Size = pictureBox1.Image.Size }); + flowLayoutPanel1.Controls[flowLayoutPanel1.Controls.Count - 1].Click += Emoticons_Click; + if (SelectedTextFormat == -1) + { + TextFormat.TextFormats.Add(PackManager.Add(domainUpDown1.Text + ".npack")); + selectedtextformat = TextFormat.TextFormats.Count - 1; + save = true; + } + var emoticon = new Emoticon(textBox1.Text); + emoticon.Image = new Bitmap(pictureBox1.Image); //2015.07.05. + TextFormat.TextFormats[SelectedTextFormat].Emoticons.Add(emoticon); + } + else if (textBox1.Text != initialtext || imagechanged) + { + TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Value = textBox1.Text; + TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Image.Dispose(); //2015.07.05. + TextFormat.TextFormats[SelectedTextFormat].Emoticons[SelectedEmoticon].Image = new Bitmap(pictureBox1.Image); //2015.07.05. + initialtext = textBox1.Text; + imagechanged = false; + (flowLayoutPanel1.Controls[SelectedEmoticon] as PictureBox).Image = pictureBox1.Image; + save = true; + } + + if (save) + PackManager.Save(TextFormat.TextFormats[SelectedTextFormat]); + } + + private string initialtext; + private void domainUpDown1_TextChanged(object sender, EventArgs e) + { + if (domainUpDown1.SelectedIndex == -1) + { + flowLayoutPanel1.Controls.Clear(); + TextFormat tf = domainUpDown1.Items.ToArray().Cast().FirstOrDefault(entry => entry.ToString() == domainUpDown1.Text); + if (tf != default(TextFormat)) + domainUpDown1.SelectedItem = tf; + } + SelectedEmoticon = 0; + imagechanged = false; + } + + private void addbtn_Click(object sender, EventArgs e) + { + SelectedEmoticon = flowLayoutPanel1.Controls.Count; + } + + private void removebtn_Click(object sender, EventArgs e) + { + if (SelectedTextFormat == -1 || SelectedEmoticon > TextFormat.TextFormats[SelectedTextFormat].Emoticons.Count) + return; + if (MessageBox.Show(Language.Translate(Language.StringID.AreYouSure), "", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + TextFormat.TextFormats[SelectedTextFormat].Emoticons.RemoveAt(SelectedEmoticon); + flowLayoutPanel1.Controls.RemoveAt(SelectedEmoticon); + if (TextFormat.TextFormats[SelectedTextFormat].Emoticons.Count == 0) + { + PackManager.Remove(TextFormat.TextFormats[SelectedTextFormat]); //2015.06.14. + TextFormat.TextFormats.RemoveAt(SelectedTextFormat); //2015.06.14. + } + } + } + + private void button1_Click(object sender, EventArgs e) + { + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + pictureBox1.Image = Program.LoadImageFromFile(openFileDialog1.FileName); + imagechanged = true; + SaveEmoticonIfChanged(); + } + } + + private void closebtn_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void Emoticons_FormClosing(object sender, FormClosingEventArgs e) + { + SaveEmoticonIfChanged(); + Program.MainF.contactList.Items.Clear(); + Program.MainF.LoadPartnerList(); + } + + private void textBox1_TextChanged(object sender, EventArgs e) + { + + } + + private void textBox1_Leave(object sender, EventArgs e) + { + SaveEmoticonIfChanged(); + } + + private void flowLayoutPanel1_Click(object sender, EventArgs e) + { + SaveEmoticonIfChanged(); + } + + private void pictureBox1_Click(object sender, EventArgs e) + { + SaveEmoticonIfChanged(); + } + } +} diff --git a/MSGer.tk/Forms/Emoticons.resx b/MSGer.tk/Forms/Emoticons.resx new file mode 100644 index 0000000..3a7d671 --- /dev/null +++ b/MSGer.tk/Forms/Emoticons.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/ErrorHandler.Designer.cs b/MSGer.tk/Forms/ErrorHandler.Designer.cs new file mode 100644 index 0000000..0135680 --- /dev/null +++ b/MSGer.tk/Forms/ErrorHandler.Designer.cs @@ -0,0 +1,131 @@ +namespace MSGer.tk +{ + partial class ErrorHandler + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.titleLabel = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.sendbtn = new System.Windows.Forms.Button(); + this.restartokbtn = new System.Windows.Forms.Button(); + this.exitbtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // titleLabel + // + this.titleLabel.AutoSize = true; + this.titleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.titleLabel.Location = new System.Drawing.Point(13, 13); + this.titleLabel.Name = "titleLabel"; + this.titleLabel.Size = new System.Drawing.Size(155, 31); + this.titleLabel.TabIndex = 0; + this.titleLabel.Text = "Hiba történt"; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.Color.White; + this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.textBox1.Location = new System.Drawing.Point(19, 48); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(338, 174); + this.textBox1.TabIndex = 1; + this.textBox1.Text = "You shouldn\'t see this text. If you do, well, sorry."; + // + // sendbtn + // + this.sendbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.sendbtn.Enabled = false; + this.sendbtn.Location = new System.Drawing.Point(19, 228); + this.sendbtn.Name = "sendbtn"; + this.sendbtn.Size = new System.Drawing.Size(75, 23); + this.sendbtn.TabIndex = 2; + this.sendbtn.Text = "Küldés"; + this.sendbtn.UseVisualStyleBackColor = true; + this.sendbtn.Click += new System.EventHandler(this.sendbtn_Click); + // + // restartokbtn + // + this.restartokbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.restartokbtn.Location = new System.Drawing.Point(282, 228); + this.restartokbtn.Name = "restartokbtn"; + this.restartokbtn.Size = new System.Drawing.Size(75, 23); + this.restartokbtn.TabIndex = 3; + this.restartokbtn.Text = "Újraindítás"; + this.restartokbtn.UseVisualStyleBackColor = true; + this.restartokbtn.Click += new System.EventHandler(this.restartbtn_Click); + // + // exitbtn + // + this.exitbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.exitbtn.Location = new System.Drawing.Point(201, 228); + this.exitbtn.Name = "exitbtn"; + this.exitbtn.Size = new System.Drawing.Size(75, 23); + this.exitbtn.TabIndex = 4; + this.exitbtn.Text = "Kilépés"; + this.exitbtn.UseVisualStyleBackColor = true; + this.exitbtn.Click += new System.EventHandler(this.exitbtn_Click); + // + // ErrorHandler + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.WhiteSmoke; + this.ClientSize = new System.Drawing.Size(369, 263); + this.Controls.Add(this.exitbtn); + this.Controls.Add(this.restartokbtn); + this.Controls.Add(this.sendbtn); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.titleLabel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ErrorHandler"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "ErrorHandler"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ErrorHandler_FormClosing); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label titleLabel; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button sendbtn; + private System.Windows.Forms.Button restartokbtn; + private System.Windows.Forms.Button exitbtn; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/ErrorHandler.cs b/MSGer.tk/Forms/ErrorHandler.cs new file mode 100644 index 0000000..6cc6f96 --- /dev/null +++ b/MSGer.tk/Forms/ErrorHandler.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class ErrorHandler : Form + { //2015.06.04. + public ErrorHandler(ErrorType type, Exception e) + { + InitializeComponent(); + try + { + sendbtn.Text = Language.Translate(Language.StringID.Sendbtn_Send); + exitbtn.Text = Language.Translate(Language.StringID.Menu_File_Exit); + restartokbtn.Text = Language.Translate(Language.StringID.RestartButton); + } + catch + { + sendbtn.Text = "Send"; + exitbtn.Text = "Exit"; + restartokbtn.Text = "Restart"; + } + switch (type) + { + case ErrorType.Unknown: + fatalerror = true; + int maxvalue = Enum.GetNames(typeof(Language.StringID)).Where(entry => entry.StartsWith("Error_Unknown")).Count(); + if (maxvalue < 1) + { + textBox1.Text = "We don't have any error messages."; + break; + } + int index = new Random().Next(1, maxvalue); + try + { + Language.StringID result; + if (Enum.TryParse("Error_Unknown" + index, out result)) + { + textBox1.Text = Language.Translate(result); + } + else + { + textBox1.Lines = new string[] + { + "Unknown error.", + "Also...", + "Something interesting happened. I don't have all messages up to the latest message count (" + index + "). Which means I forgot to do something." + }; + } + } + catch + { //2015.06.14. ˇˇ + textBox1.Text = "Unknown error."; + } + break; + case ErrorType.ServerError: + fatalerror = false; + textBox1.Lines = new string[] + { + Language.Translate(Language.StringID.Error_ServerError) + }; + break; + case ErrorType.ServerConnectError: + fatalerror = false; + textBox1.Text = Language.Translate(Language.StringID.ConnectError); + break; + case ErrorType.Chat_NoPartners: + fatalerror = false; + textBox1.Text = Language.Translate(Language.StringID.Chat_NoWindow); + break; + default: + fatalerror = true; + textBox1.Text = "I don't have this implemented (" + type + "). I'm really sorry."; + break; + } + + if (!fatalerror) + { + exitbtn.Hide(); + restartokbtn.Text = "OK"; + } + + try + { + if (fatalerror) + titleLabel.Text = Language.Translate(Language.StringID.FatalError); + else + titleLabel.Text = Language.Translate(Language.StringID.Error); + } + catch + { + if (fatalerror) //<-- 2015.06.14. + titleLabel.Text = "A fatal error occured."; //2015.06.14. + else + titleLabel.Text = "An error occured."; + } + this.Text = titleLabel.Text; + + textBox1.AppendText(Environment.NewLine + e.Message); + textBox1.AppendText(Environment.NewLine + e.StackTrace); + this.ShowDialog(); + } + + private void exitbtn_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void ErrorHandler_FormClosing(object sender, FormClosingEventArgs e) + { +#if !DEBUG + if (fatalerror) + Program.Exit(); +#endif + } + + private bool fatalerror; + private void restartbtn_Click(object sender, EventArgs e) + { + if (fatalerror) + Program.Restart(); + else + this.Close(); + } + + private void sendbtn_Click(object sender, EventArgs e) + { + //TODO: Hibajelentés + } + } + public enum ErrorType + { + Unknown, + ServerError, + ServerConnectError, + Chat_NoPartners + } +} diff --git a/MSGer.tk/Forms/ErrorHandler.resx b/MSGer.tk/Forms/ErrorHandler.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/ErrorHandler.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/FloatingChatIcon.Designer.cs b/MSGer.tk/Forms/FloatingChatIcon.Designer.cs new file mode 100644 index 0000000..b266be8 --- /dev/null +++ b/MSGer.tk/Forms/FloatingChatIcon.Designer.cs @@ -0,0 +1,74 @@ +namespace MSGer.tk +{ + partial class FloatingChatIcon + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(260, 238); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // FloatingChatIcon + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(284, 262); + this.Controls.Add(this.pictureBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FloatingChatIcon"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "FloatingChatIcon"; + this.TopMost = true; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/FloatingChatIcon.cs b/MSGer.tk/Forms/FloatingChatIcon.cs new file mode 100644 index 0000000..4414b68 --- /dev/null +++ b/MSGer.tk/Forms/FloatingChatIcon.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class FloatingChatIcon : Form + { + [StructLayout(LayoutKind.Sequential)] + public struct MARGINS + { + public int Left; + public int Right; + public int Top; + public int Bottom; + } + + [DllImport("dwmapi.dll", PreserveSig = false)] + public static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS margins); + + [DllImport("dwmapi.dll", PreserveSig = false)] + public static extern bool DwmIsCompositionEnabled(); + + public FloatingChatIcon(ChatPanel cp) + { + InitializeComponent(); + } + + // defines how far we are extending the Glass margins + private MARGINS margins; + + // uses PInvoke to setup the Glass area. + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + if (DwmIsCompositionEnabled()) + { + // Paint the glass effect. + margins = new MARGINS(); + margins.Top = -1; + margins.Left = 20; + DwmExtendFrameIntoClientArea(this.Handle, ref margins); + } + } + } +} diff --git a/MSGer.tk/Forms/FloatingChatIcon.resx b/MSGer.tk/Forms/FloatingChatIcon.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/FloatingChatIcon.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/InvitePartner.Designer.cs b/MSGer.tk/Forms/InvitePartner.Designer.cs new file mode 100644 index 0000000..71499a7 --- /dev/null +++ b/MSGer.tk/Forms/InvitePartner.Designer.cs @@ -0,0 +1,176 @@ +namespace MSGer.tk +{ + partial class InvitePartner + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.addbtn = new System.Windows.Forms.Button(); + this.removebtn = new System.Windows.Forms.Button(); + this.copybtn = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.hideAccepted = new System.Windows.Forms.CheckBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.ForeColor = System.Drawing.Color.Blue; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(189, 24); + this.label1.TabIndex = 0; + this.label1.Text = "Ismerős meghívása"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label2.Location = new System.Drawing.Point(17, 53); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(98, 24); + this.label2.TabIndex = 1; + this.label2.Text = "Letöltőlink:"; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.Color.White; + this.textBox1.Location = new System.Drawing.Point(21, 90); + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(382, 20); + this.textBox1.TabIndex = 2; + this.textBox1.Text = "http://msger.url.ph/download.php?version=latest"; + // + // listBox1 + // + this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.BackColor = System.Drawing.Color.White; + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(21, 163); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(379, 173); + this.listBox1.TabIndex = 6; + // + // addbtn + // + this.addbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.addbtn.Location = new System.Drawing.Point(21, 343); + this.addbtn.Name = "addbtn"; + this.addbtn.Size = new System.Drawing.Size(75, 23); + this.addbtn.TabIndex = 7; + this.addbtn.Text = "Hozzáadás"; + this.addbtn.UseVisualStyleBackColor = true; + this.addbtn.Click += new System.EventHandler(this.addbtn_Click); + // + // removebtn + // + this.removebtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.removebtn.Location = new System.Drawing.Point(102, 343); + this.removebtn.Name = "removebtn"; + this.removebtn.Size = new System.Drawing.Size(75, 23); + this.removebtn.TabIndex = 8; + this.removebtn.Text = "Eltávolítás"; + this.removebtn.UseVisualStyleBackColor = true; + this.removebtn.Click += new System.EventHandler(this.removebtn_Click); + // + // copybtn + // + this.copybtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.copybtn.Location = new System.Drawing.Point(292, 343); + this.copybtn.Name = "copybtn"; + this.copybtn.Size = new System.Drawing.Size(108, 23); + this.copybtn.TabIndex = 9; + this.copybtn.Text = "Kód másolása"; + this.copybtn.UseVisualStyleBackColor = true; + this.copybtn.Click += new System.EventHandler(this.copybtn_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label3.Location = new System.Drawing.Point(17, 125); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(64, 24); + this.label3.TabIndex = 10; + this.label3.Text = "Kódok"; + // + // hideAccepted + // + this.hideAccepted.AutoSize = true; + this.hideAccepted.Location = new System.Drawing.Point(251, 132); + this.hideAccepted.Name = "hideAccepted"; + this.hideAccepted.Size = new System.Drawing.Size(149, 17); + this.hideAccepted.TabIndex = 11; + this.hideAccepted.Text = "Elfogadott kódok elrejtése"; + this.hideAccepted.UseVisualStyleBackColor = true; + this.hideAccepted.CheckedChanged += new System.EventHandler(this.hideAccepted_CheckedChanged); + // + // InvitePartner + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(415, 449); + this.Controls.Add(this.hideAccepted); + this.Controls.Add(this.label3); + this.Controls.Add(this.copybtn); + this.Controls.Add(this.removebtn); + this.Controls.Add(this.addbtn); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "InvitePartner"; + this.Text = "Ismerős meghivása"; + this.Load += new System.EventHandler(this.InvitePartner_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button addbtn; + private System.Windows.Forms.Button removebtn; + private System.Windows.Forms.Button copybtn; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckBox hideAccepted; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/InvitePartner.cs b/MSGer.tk/Forms/InvitePartner.cs new file mode 100644 index 0000000..1d6c8b0 --- /dev/null +++ b/MSGer.tk/Forms/InvitePartner.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class InvitePartner : ThemedForms + { + public InvitePartner() + { + InitializeComponent(); + } + + private void InvitePartner_Load(object sender, EventArgs e) + { + RefreshList(); + } + + private void addbtn_Click(object sender, EventArgs e) + { + string res = Networking.SendRequest(Networking.RequestType.AddCode, "", 0, true); + if (res.Length < "Fail".Length || res.Substring(0, "Fail".Length) == "Fail") + MessageBox.Show("A kódgenerálás sikertelen.\n\n" + res, "Hiba"); + else + RefreshList(); + } + + public void RefreshList() + { + listBox1.Items.Clear(); + string[] response = Networking.SendRequest(Networking.RequestType.GetCodes, "", 0, true).Split('ͦ'); + int x = 0; + for (int i = 0; i + 1 < response.Length; i += 2) + { + if (Int32.Parse(response[i + 1]) == 1) + { + if (!hideAccepted.Checked) + listBox1.Items.Add("Elfogadott - " + response[i]); + } + else if (Int32.Parse(response[i + 1]) == 0) + listBox1.Items.Add("Visszaigazolásra vár - " + response[i]); + else MessageBox.Show("Hiba:\n" + response[i] + "\n" + response[i + 1]); + x++; + } + } + + private void removebtn_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex == -1) + return; + string res = Networking.SendRequest(Networking.RequestType.RemCode, listBox1.SelectedItem.ToString().Remove(0, listBox1.SelectedItem.ToString().IndexOf(" - ") + " - ".Length), 0, true); + if (res.Substring(0, "Fail".Length) == "Fail") + MessageBox.Show("A kód törlése sikertelen.\n\n" + res, "Hiba"); + else RefreshList(); + } + + private void copybtn_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex == -1) + return; + Clipboard.SetText(listBox1.SelectedItem.ToString().Remove(0, listBox1.SelectedItem.ToString().IndexOf(" - ") + " - ".Length)); + } + + private void hideAccepted_CheckedChanged(object sender, EventArgs e) + { + RefreshList(); + } + } +} diff --git a/MSGer.tk/Forms/InvitePartner.resx b/MSGer.tk/Forms/InvitePartner.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/InvitePartner.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/LoginForm.Designer.cs b/MSGer.tk/Forms/LoginForm.Designer.cs new file mode 100644 index 0000000..9318efa --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.Designer.cs @@ -0,0 +1,202 @@ +namespace MSGer.tk +{ + partial class LoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.linkLabel2 = new System.Windows.Forms.LinkLabel(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.ForeColor = System.Drawing.Color.Blue; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(197, 33); + this.label1.TabIndex = 0; + this.label1.Text = "Bejelentkezés"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label2.Location = new System.Drawing.Point(19, 77); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(63, 24); + this.label2.TabIndex = 1; + this.label2.Text = "E-mail"; + // + // textBox1 + // + this.textBox1.AcceptsReturn = true; + this.textBox1.AcceptsTab = true; + this.textBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.textBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.textBox1.Location = new System.Drawing.Point(88, 80); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(294, 20); + this.textBox1.TabIndex = 2; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label3.Location = new System.Drawing.Point(19, 106); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(63, 24); + this.label3.TabIndex = 3; + this.label3.Text = "Jelszó"; + // + // textBox2 + // + this.textBox2.AcceptsReturn = true; + this.textBox2.AcceptsTab = true; + this.textBox2.Location = new System.Drawing.Point(179, 110); + this.textBox2.Name = "textBox2"; + this.textBox2.PasswordChar = '→'; + this.textBox2.Size = new System.Drawing.Size(203, 20); + this.textBox2.TabIndex = 4; + // + // button1 + // + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.button1.Location = new System.Drawing.Point(235, 153); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(147, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Bejelentkezés"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // textBox3 + // + this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox3.BackColor = System.Drawing.Color.SteelBlue; + this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox3.ForeColor = System.Drawing.Color.White; + this.textBox3.Location = new System.Drawing.Point(13, 198); + this.textBox3.Multiline = true; + this.textBox3.Name = "textBox3"; + this.textBox3.ReadOnly = true; + this.textBox3.Size = new System.Drawing.Size(369, 261); + this.textBox3.TabIndex = 6; + this.textBox3.Text = resources.GetString("textBox3.Text"); + this.textBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.linkLabel1.LinkColor = System.Drawing.Color.Blue; + this.linkLabel1.Location = new System.Drawing.Point(23, 162); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(77, 13); + this.linkLabel1.TabIndex = 7; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "Regisztráció"; + this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Blue; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.RegistrateLink); + // + // linkLabel2 + // + this.linkLabel2.AutoSize = true; + this.linkLabel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.linkLabel2.Location = new System.Drawing.Point(23, 175); + this.linkLabel2.Name = "linkLabel2"; + this.linkLabel2.Size = new System.Drawing.Size(66, 13); + this.linkLabel2.TabIndex = 8; + this.linkLabel2.TabStop = true; + this.linkLabel2.Text = "forgotpass"; + this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Blue; + this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); + // + // LoginForm + // + this.AcceptButton = this.button1; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(394, 471); + this.Controls.Add(this.linkLabel2); + this.Controls.Add(this.linkLabel1); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.label3); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.Name = "LoginForm"; + this.Opacity = 0.9D; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Bejelentkezés"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoginForm_FormClosing); + this.Load += new System.EventHandler(this.LoginForm_Load); + this.Controls.SetChildIndex(this.label1, 0); + this.Controls.SetChildIndex(this.label2, 0); + this.Controls.SetChildIndex(this.textBox1, 0); + this.Controls.SetChildIndex(this.label3, 0); + this.Controls.SetChildIndex(this.textBox2, 0); + this.Controls.SetChildIndex(this.button1, 0); + this.Controls.SetChildIndex(this.textBox3, 0); + this.Controls.SetChildIndex(this.linkLabel1, 0); + this.Controls.SetChildIndex(this.linkLabel2, 0); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.LinkLabel linkLabel2; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/LoginForm.LoginUser.cs b/MSGer.tk/Forms/LoginForm.LoginUser.cs new file mode 100644 index 0000000..9c05436 --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.LoginUser.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + partial class LoginForm + { + public static HttpWebRequest Request; //2014.03.27. - A megállitáshoz + + public void LoginUser() + { + string UserText = ""; + string PassText = ""; + this.Invoke(new Action(delegate + { //2015.04.03. + UserText = textBox1.Text; + PassText = textBox2.Text; + linkLabel1.Enabled = false; + button1.Text = Language.Translate(Language.StringID.Button_Cancel); + })); + HttpWebRequest httpWReq = + (HttpWebRequest)WebRequest.Create("http://msger.url.ph/client.php"); + + Request = httpWReq; //2014.03.27. + + ASCIIEncoding encoding = new ASCIIEncoding(); + string postData = "username=" + UserText; + postData += "&password=" + CalculateMD5Hash(PassText).ToLower(); //ToLower: 2014.10.24. 1:22 - Most már a PHP-nak is titkosítania kell többek közt MD5-tel + postData += "&key=cas1fe4a6feFEFEFE1616CE8099VFE1444cdasf48c1ase5dg"; + //postData += "&port=" + Storage.Settings[SettingType.Port]; //2014.08.29. + postData += "&port=" + CurrentUser.Port; //2015.05.24. + List myips = new List(); + do + { //Az ips már deklarálva lesz később; megváltoztattam myips-re ezt + foreach (var ipaddr in Dns.GetHostAddresses(Dns.GetHostName())) + if (ipaddr.AddressFamily == AddressFamily.InterNetworkV6) + myips.Add(ipaddr); + string ipstr = ""; + foreach (var ip in myips) + { + ipstr += ip + ";"; + } + postData += "&ip=" + Uri.EscapeUriString(ipstr); + } while (false); + byte[] data = encoding.GetBytes(postData); + + httpWReq.Method = "POST"; + httpWReq.ContentType = "application/x-www-form-urlencoded"; + httpWReq.ContentLength = data.Length; + + try + { + using (Stream stream = httpWReq.GetRequestStream()) + { + stream.Write(data, 0, data.Length); + } + } + catch (WebException e) + { + if (e.Status != WebExceptionStatus.RequestCanceled) + { + new ErrorHandler(ErrorType.ServerConnectError, e); //2015.06.04. + ResetAfterLogin(false); //2015.04.03. + return; + } + else + { + return; + } + } + + HttpWebResponse response; + try + { + response = (HttpWebResponse)httpWReq.GetResponse(); + } + catch (WebException e) + { + if (e.Status != WebExceptionStatus.RequestCanceled) + { + new ErrorHandler(ErrorType.ServerConnectError, e); //2015.06.04. + ResetAfterLogin(false); //2015.04.03. + return; + } + else + { + return; + } + } + + string responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); + + try + { + if (responseString[0] == '<') + { + ResetAfterLogin(false); //2015.04.03. + new ErrorHandler(ErrorType.ServerConnectError, new Exception(responseString)); + return; + } + else + responseString = responseString.Remove(responseString.IndexOf('<')); + } + catch + { + } + + if (String.Compare(responseString, "Fail") == 0) + { + ResetAfterLogin(false); //2015.04.03. + MessageBox.Show(Language.Translate(Language.StringID.Error) + ": " + Language.Translate(Language.StringID.Login_BadNamePass), Language.Translate(Language.StringID.Error)); + } + else if (responseString.Contains("Fail")) + { //2015.04.03. + ResetAfterLogin(false); + new ErrorHandler(ErrorType.ServerConnectError, new Exception(responseString)); //2015.06.04. + } + else + { + //Elmenti az E-mail-t + if (!Storage.Settings[SettingType.Email].Contains(UserText)) + { + if (Storage.Settings[SettingType.Email].Length != 0) //2014.07.08. + Storage.Settings[SettingType.Email] += ","; + Storage.Settings[SettingType.Email] += UserText; + } + Storage.Settings[SettingType.LastUsedEmail] = Storage.Settings[SettingType.Email].Split(',').ToList().IndexOf(UserText).ToString(); + string[] respstr = responseString.Split('ͦ'); + + if (respstr.Any(entry => entry.Contains("Fail"))) //2014.12.05. + { + //this.Invoke(new MyDelegate(ResetAfterLogin)); + ResetAfterLogin(false); //2015.04.03. + /*try + { + MessageBox.Show(respstr.Single(entry => entry.Contains("Fail"))); //2014.12.05. + } + catch { }*/ + MessageBox.Show(respstr.FirstOrDefault(entry => entry.Contains("Fail"))); //2014.12.05. - Single-->FirstOrDefault: 2015.06.06. + return; + } + string[] entries = respstr[(int)LoginInfo.IPs].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + IEnumerable ips = entries.Select(entry => ((entry != ",") ? new IPEndPoint(IPAddress.Parse(entry.Split(',')[0]), Int32.Parse(entry.Split(',')[1])) : new IPEndPoint(IPAddress.Loopback, 0))); + UserInfo.IPs = new HashSet(ips); //2014.08.30. + CurrentUser.IPs = myips; + + CurrentUser.UserID = Int32.Parse(respstr[(int)LoginInfo.UserID]); //2014.09.01. - Áthelyeztem, hogy addig ne higgye bejelentkezettnek, amíg el nem küldi a többieknek + + Storage.SaltKey = CalculateMD5Hash(PassText); //2014.08.07. + Storage.FileName = respstr[(int)LoginInfo.UserID] + ".db"; //2014.09.01. - Felesleges számmá alakítani, majd vissza + + CurrentUser.UserName = UserText; //2014.09.01. - Ha semmit nem tud saját magáról, és más sem, de nem ismerőse saját magának, akkor az itt beállított felhasználónév érvényesül + CurrentUser.Name = UserText; //2014.09.01. + string ReceivedPass = respstr[(int)LoginInfo.Password]; //2014.10.24. 1:39 + LoginForm.UserCode = CalculateMD5Hash(ReceivedPass + " Some text because why not " + CurrentUser.UserID).ToLower(); + + this.Invoke(new Action(delegate + { + this.Dispose(); + })); + } + } + } +} diff --git a/MSGer.tk/Forms/LoginForm.RegistrationForm.Designer.cs b/MSGer.tk/Forms/LoginForm.RegistrationForm.Designer.cs new file mode 100644 index 0000000..6bfb4b3 --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.RegistrationForm.Designer.cs @@ -0,0 +1,176 @@ +namespace MSGer.tk +{ + partial class LoginForm_RegistrationForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.codeText = new System.Windows.Forms.TextBox(); + this.userText = new System.Windows.Forms.TextBox(); + this.passText = new System.Windows.Forms.TextBox(); + this.emailText = new System.Windows.Forms.TextBox(); + this.registerButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.ForeColor = System.Drawing.Color.Blue; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(124, 24); + this.label1.TabIndex = 0; + this.label1.Text = "Regisztráció"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.label2.Location = new System.Drawing.Point(17, 58); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 24); + this.label2.TabIndex = 1; + this.label2.Text = "Kód"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.label3.Location = new System.Drawing.Point(17, 92); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(143, 24); + this.label3.TabIndex = 2; + this.label3.Text = "Felhasználónév"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.label4.Location = new System.Drawing.Point(17, 125); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(63, 24); + this.label4.TabIndex = 3; + this.label4.Text = "Jelszó"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); + this.label5.Location = new System.Drawing.Point(17, 160); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(63, 24); + this.label5.TabIndex = 4; + this.label5.Text = "E-mail"; + // + // codeText + // + this.codeText.Location = new System.Drawing.Point(86, 63); + this.codeText.Name = "codeText"; + this.codeText.Size = new System.Drawing.Size(358, 20); + this.codeText.TabIndex = 6; + // + // userText + // + this.userText.Location = new System.Drawing.Point(166, 97); + this.userText.Name = "userText"; + this.userText.Size = new System.Drawing.Size(278, 20); + this.userText.TabIndex = 7; + // + // passText + // + this.passText.Location = new System.Drawing.Point(166, 130); + this.passText.Name = "passText"; + this.passText.PasswordChar = '→'; + this.passText.Size = new System.Drawing.Size(278, 20); + this.passText.TabIndex = 8; + // + // emailText + // + this.emailText.Location = new System.Drawing.Point(86, 165); + this.emailText.Name = "emailText"; + this.emailText.Size = new System.Drawing.Size(358, 20); + this.emailText.TabIndex = 9; + // + // registerButton + // + this.registerButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.registerButton.Location = new System.Drawing.Point(17, 220); + this.registerButton.Name = "registerButton"; + this.registerButton.Size = new System.Drawing.Size(427, 23); + this.registerButton.TabIndex = 10; + this.registerButton.Text = "Regisztráció"; + this.registerButton.UseVisualStyleBackColor = true; + this.registerButton.Click += new System.EventHandler(this.registerButton_Click); + // + // LoginForm_RegistrationForm + // + this.AcceptButton = this.registerButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(469, 356); + this.Controls.Add(this.registerButton); + this.Controls.Add(this.emailText); + this.Controls.Add(this.passText); + this.Controls.Add(this.userText); + this.Controls.Add(this.codeText); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LoginForm_RegistrationForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Regisztráció"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox codeText; + private System.Windows.Forms.TextBox userText; + private System.Windows.Forms.TextBox passText; + private System.Windows.Forms.TextBox emailText; + private System.Windows.Forms.Button registerButton; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/LoginForm.RegistrationForm.cs b/MSGer.tk/Forms/LoginForm.RegistrationForm.cs new file mode 100644 index 0000000..79edd73 --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.RegistrationForm.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class LoginForm_RegistrationForm : ThemedForms + { + public LoginForm_RegistrationForm() + { + InitializeComponent(); + label1.Text = Language.Translate(Language.StringID.Registration); + label2.Text = Language.Translate(Language.StringID.Reg_Code); + label3.Text = Language.Translate(Language.StringID.UserName); + label4.Text = Language.Translate(Language.StringID.Password); + registerButton.Text = Language.Translate(Language.StringID.Registration); + } + + private void registerButton_Click(object sender, EventArgs e) + { + registerButton.Enabled = false; + if (codeText.TextLength == 0 || userText.TextLength == 0 || passText.TextLength == 0 || emailText.TextLength == 0) + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_EmptyField), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + return; + } + string response = Networking.SendRequest(Networking.RequestType.Register, codeText.Text + "ͦ" + userText.Text + "ͦ" + LoginForm.CalculateMD5Hash(passText.Text) + "ͦ" + emailText.Text, 2, false); + if (response == "code") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_CodeErr), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + } + else if (response == "uname") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_NameErr), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + } + else if (response == "ulen") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_NameLen), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + } + else if (response == "plen") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_PassLen), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + } + else if (response == "email") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_Email), Language.Translate(Language.StringID.Error)); + registerButton.Enabled = true; + } + else if (response == "Success!") + { + MessageBox.Show(Language.Translate(Language.StringID.Reg_Success)); + Close(); + } + else + { + new ErrorHandler(ErrorType.ServerError, new Exception(response)); //2015.06.04. + registerButton.Enabled = true; + } + } + } +} diff --git a/MSGer.tk/Forms/LoginForm.RegistrationForm.resx b/MSGer.tk/Forms/LoginForm.RegistrationForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.RegistrationForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/LoginForm.cs b/MSGer.tk/Forms/LoginForm.cs new file mode 100644 index 0000000..11dae8c --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Net; +using System.IO; +using System.Security.Cryptography; +using System.Configuration; +using System.Threading; +using System.Net.Sockets; + +namespace MSGer.tk +{ + public partial class LoginForm : ThemedForms + { + public static string UserCode = ""; + public static Thread LThread; + private void LoginForm_Load(object sender, EventArgs e) + { + List tmp; //E-mail - 2014.04.02. + if (Storage.Settings[SettingType.Email].Length != 0) + tmp = Storage.Settings[SettingType.Email].Split(',').ToList(); + else tmp = new List(); + tmp.Add(""); + textBox1.Text = tmp[Int32.Parse(Storage.Settings[SettingType.LastUsedEmail])]; //2014.07.08. + textBox1.AutoCompleteCustomSource.AddRange(tmp.ToArray()); + this.Activate(); + this.Activate(); + } + public LoginForm() + { + InitializeComponent(); + this.Text = Language.Translate(Language.StringID.Login); + label1.Text = Language.Translate(Language.StringID.Login); + label3.Text = Language.Translate(Language.StringID.Password); + button1.Text = Language.Translate(Language.StringID.Login); + linkLabel1.Text = Language.Translate(Language.StringID.Registration); + linkLabel2.Text = Language.Translate(Language.StringID.ForgotPassword); + textBox3.Text = ""; + List lines = new List(); + lines.Add(Language.Translate(Language.StringID.Login_Desc1)); + lines.Add(""); + lines.Add(Language.Translate(Language.StringID.Login_Desc2)); + textBox3.Lines = lines.ToArray(); + } + private void button1_Click(object sender, EventArgs e) + { + if (button1.Text == Language.Translate(Language.StringID.Button_Cancel)) + { + ResetAfterLogin(true); + } + else + { + try + { + if (LThread.IsAlive) + { + //2014.03.27. - Ne csináljon semmit - Elvégre ilyen nem fordulhat elő sokáig most már + return; + } + } + catch + { + } + + //Ellenőrizzen le néhány dolgot helyileg - 2014.04.28. + if (textBox2.Text.Length == 0) + return; + + textBox1.ReadOnly = true; //2015.04.08. + textBox2.ReadOnly = true; //2015.04.08. + + // Create the thread object, passing in the Alpha.Beta method + // via a ThreadStart delegate. This does not start the thread. + LThread = new Thread(new ThreadStart(LoginUser)); + LThread.Name = "Login Thread"; + + // Start the thread + LThread.Start(); + } + } + /// + /// A login threadból (stoplogint=false) hívja Invoke-kal + /// + /// + public void ResetAfterLogin(bool stoplogint) + { + var a = new Action(delegate //2015.04.03. + { + button1.Enabled = false; + Request.Abort(); + if (stoplogint) //2014.09.01. + LThread.Abort(); //2014.09.01. + button1.Text = Language.Translate(Language.StringID.Login); + button1.Enabled = true; + linkLabel1.Enabled = true; + textBox1.Enabled = true; //2014.09.01. + textBox2.Enabled = true; //2014.09.01. + textBox1.ReadOnly = false; //2015.04.08. + textBox2.ReadOnly = false; //2015.04.08. + }); + if (stoplogint) //2015.04.03. + a(); + else + this.Invoke(a); + } + + public enum LoginInfo + { + UserID, + UserName, + IPs, + Password + } + + public static string CalculateMD5Hash(string input) + { + // step 1, calculate MD5 hash from input + MD5 md5 = System.Security.Cryptography.MD5.Create(); + byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input); + byte[] hash = md5.ComputeHash(inputBytes); + + // step 2, convert byte array to hex string + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < hash.Length; i++) + { + sb.Append(hash[i].ToString("X2")); + } + return sb.ToString(); + } + + private void RegistrateLink(object sender, LinkLabelLinkClickedEventArgs e) + { + (new LoginForm_RegistrationForm()).ShowDialog(); + } + + private void LoginForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (LThread != null && LThread.IsAlive) + { + LThread.Abort(); //2014.03.27. - Na vajon kell-e más + Request.Abort(); //2014.03.27. - Kell... Ez + } + if (CurrentUser.UserID == 0) + Program.Exit(); + } + + private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + if (textBox1.Text.Length == 0) + { //TODO: Fordítás + MessageBox.Show("Nincs megadva felhasználónév."); //Translate! + return; + } + if (MessageBox.Show("Új jelszót kérsz a megadott névhez?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + string ret = Networking.SendRequest(Networking.RequestType.ResetPass, textBox1.Text, 0, false); + if (ret == "nouser") + MessageBox.Show("A megadott felhasználó nem létezik."); + else if (ret == "already") + MessageBox.Show("A link MÁR el lett küldve az E-mail címedre."); + else if (ret == "sent") + MessageBox.Show("A link elküldve az E-mail címedre."); + else if (ret.Contains("notsent")) + MessageBox.Show("A link NEM lett elküldve az E-mail címedre.\nHiba: " + ret.Remove(ret.IndexOf("notsent"), "notsent".Length + 1)); + else + MessageBox.Show("Ismeretlen hiba:\n" + ret); + } + } + } +} diff --git a/MSGer.tk/Forms/LoginForm.resx b/MSGer.tk/Forms/LoginForm.resx new file mode 100644 index 0000000..7938e5e --- /dev/null +++ b/MSGer.tk/Forms/LoginForm.resx @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Az e-mail helyett használható a felhasználóneved is. + +Ha nem tudsz bejelentkezni, próbáld meg újrainditani a programot. Ha az sem segít, és nem a felhasználóneveddel/jelszavaddal van a probléma, akkor jelentsd a problémát. + + \ No newline at end of file diff --git a/MSGer.tk/Forms/MainForm.Designer.cs b/MSGer.tk/Forms/MainForm.Designer.cs new file mode 100644 index 0000000..bf3a356 --- /dev/null +++ b/MSGer.tk/Forms/MainForm.Designer.cs @@ -0,0 +1,945 @@ +namespace MSGer.tk +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + SzNPProjects.RichListViewColumn richListViewColumn1 = new SzNPProjects.RichListViewColumn(); + SzNPProjects.RichListViewColumn richListViewColumn2 = new SzNPProjects.RichListViewColumn(); + SzNPProjects.RichListViewColumn richListViewColumn3 = new SzNPProjects.RichListViewColumn(); + SzNPProjects.RichListViewColumn richListViewColumn4 = new SzNPProjects.RichListViewColumn(); + this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); + this.iconMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem(); + this.panel2 = new System.Windows.Forms.Panel(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fájlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kijelentkezésToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.állapotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.elérhetőToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.elfoglaltToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.nincsAGépnélToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.rejtveKapcsolódikToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.fájlKüldéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.bezárásToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.kilépésToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ismerősökToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ismerősFelvételeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ismerősSzerkesztéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ismerősTörléseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.csoportLétrehozásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.kategóriaLétrehozásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kategóriaSzerkesztéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.kategóriaTörléseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.műveletekToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.azonnaliÜzenetKüldéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.egyébKüldéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.emailKüldéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fájlKüldéseToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.videóhivásInditásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.onlineFájlokMegtekintéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.közösJátékToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.távsegitségKéréseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.eszközökToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mindigLegfelülToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.hangulatjelekToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.megjelenitendőKépVáltásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.háttérMódositásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.hangokÉsVideóBeállitásaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); + this.beállitásokToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); + this.szkriptíróToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.súgóToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.témakörökToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); + this.aSzolgáltatásÁllapotsaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.adatvédelmiNyilatkozatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.használatiFeltételekToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.visszaélésBejelentéseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); + this.segitsenAProgramTökéletesitésébenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); + this.névjegyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.partnerImages = new System.Windows.Forms.ImageList(this.components); + this.contactList = new SzNPProjects.RichListView(); + this.MainPanel = new System.Windows.Forms.Panel(); + this.searchListView = new SzNPProjects.RichListView(); + this.statusStrip2 = new System.Windows.Forms.StatusStrip(); + this.servers = new System.Windows.Forms.ToolStripStatusLabel(); + this.onlineservers = new System.Windows.Forms.ToolStripStatusLabel(); + this.mainserver = new System.Windows.Forms.ToolStripStatusLabel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.chatIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.listPartnerMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.iconMenu.SuspendLayout(); + this.panel2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.MainPanel.SuspendLayout(); + this.statusStrip2.SuspendLayout(); + this.SuspendLayout(); + // + // notifyIcon1 + // + this.notifyIcon1.ContextMenuStrip = this.iconMenu; + this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); + this.notifyIcon1.Text = "MSGer.tk"; + this.notifyIcon1.DoubleClick += new System.EventHandler(this.toolStripMenuItem4_Click); + // + // iconMenu + // + this.iconMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem4, + this.toolStripSeparator18, + this.toolStripMenuItem8, + this.toolStripMenuItem9}); + this.iconMenu.Name = "partnerMenu"; + this.iconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.iconMenu.Size = new System.Drawing.Size(147, 76); + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(146, 22); + this.toolStripMenuItem4.Text = "Megjelenítés"; + this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click); + // + // toolStripSeparator18 + // + this.toolStripSeparator18.Name = "toolStripSeparator18"; + this.toolStripSeparator18.Size = new System.Drawing.Size(143, 6); + // + // toolStripMenuItem8 + // + this.toolStripMenuItem8.Name = "toolStripMenuItem8"; + this.toolStripMenuItem8.Size = new System.Drawing.Size(146, 22); + this.toolStripMenuItem8.Text = "Kijelentkezés"; + this.toolStripMenuItem8.Click += new System.EventHandler(this.LogoutUser); + // + // toolStripMenuItem9 + // + this.toolStripMenuItem9.Name = "toolStripMenuItem9"; + this.toolStripMenuItem9.Size = new System.Drawing.Size(146, 22); + this.toolStripMenuItem9.Text = "Kilépés"; + this.toolStripMenuItem9.Click += new System.EventHandler(this.ExitProgram); + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.BackgroundImage = global::MSGer.tk.Properties.Resources.Keresősáv; + this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.panel2.Controls.Add(this.textBox1); + this.panel2.Cursor = System.Windows.Forms.Cursors.IBeam; + this.panel2.Location = new System.Drawing.Point(3, 3); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(494, 31); + this.panel2.TabIndex = 5; + this.panel2.Click += new System.EventHandler(this.panel2_Click); + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(249)))), ((int)(((byte)(252))))); + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(137)))), ((int)(((byte)(161)))), ((int)(((byte)(194))))); + this.textBox1.Location = new System.Drawing.Point(6, 8); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(485, 13); + this.textBox1.TabIndex = 3; + this.textBox1.Text = "Ismerősök keresése..."; + this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + this.textBox1.Enter += new System.EventHandler(this.ClearSearchBar); + this.textBox1.Leave += new System.EventHandler(this.PutTextInSearchBar); + // + // menuStrip1 + // + this.menuStrip1.BackColor = System.Drawing.Color.Black; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fájlToolStripMenuItem, + this.ismerősökToolStripMenuItem, + this.műveletekToolStripMenuItem, + this.eszközökToolStripMenuItem, + this.súgóToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; + this.menuStrip1.Size = new System.Drawing.Size(799, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fájlToolStripMenuItem + // + this.fájlToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.kijelentkezésToolStripMenuItem, + this.toolStripMenuItem1, + this.toolStripSeparator1, + this.állapotToolStripMenuItem, + this.toolStripSeparator2, + this.fájlKüldéseToolStripMenuItem, + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem, + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem, + this.toolStripSeparator3, + this.bezárásToolStripMenuItem, + this.toolStripSeparator4, + this.kilépésToolStripMenuItem}); + this.fájlToolStripMenuItem.Name = "fájlToolStripMenuItem"; + this.fájlToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fájlToolStripMenuItem.Text = "Fájl"; + // + // kijelentkezésToolStripMenuItem + // + this.kijelentkezésToolStripMenuItem.Name = "kijelentkezésToolStripMenuItem"; + this.kijelentkezésToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.kijelentkezésToolStripMenuItem.Text = "Kijelentkezés"; + this.kijelentkezésToolStripMenuItem.Click += new System.EventHandler(this.LogoutUser); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(292, 22); + this.toolStripMenuItem1.Text = "Újabb felhasználó bejelentkeztetése..."; + this.toolStripMenuItem1.Click += new System.EventHandler(this.LoginNewUser); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(289, 6); + // + // állapotToolStripMenuItem + // + this.állapotToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.elérhetőToolStripMenuItem, + this.elfoglaltToolStripMenuItem, + this.nincsAGépnélToolStripMenuItem, + this.rejtveKapcsolódikToolStripMenuItem}); + this.állapotToolStripMenuItem.Name = "állapotToolStripMenuItem"; + this.állapotToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.állapotToolStripMenuItem.Text = "Állapot"; + // + // elérhetőToolStripMenuItem + // + this.elérhetőToolStripMenuItem.Name = "elérhetőToolStripMenuItem"; + this.elérhetőToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.elérhetőToolStripMenuItem.Text = "Elérhető"; + this.elérhetőToolStripMenuItem.Click += new System.EventHandler(this.SetOnlineState); + // + // elfoglaltToolStripMenuItem + // + this.elfoglaltToolStripMenuItem.Name = "elfoglaltToolStripMenuItem"; + this.elfoglaltToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.elfoglaltToolStripMenuItem.Text = "Elfoglalt"; + this.elfoglaltToolStripMenuItem.Click += new System.EventHandler(this.SetOnlineState); + // + // nincsAGépnélToolStripMenuItem + // + this.nincsAGépnélToolStripMenuItem.Name = "nincsAGépnélToolStripMenuItem"; + this.nincsAGépnélToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.nincsAGépnélToolStripMenuItem.Text = "Nincs a gépnél"; + this.nincsAGépnélToolStripMenuItem.Click += new System.EventHandler(this.SetOnlineState); + // + // rejtveKapcsolódikToolStripMenuItem + // + this.rejtveKapcsolódikToolStripMenuItem.Name = "rejtveKapcsolódikToolStripMenuItem"; + this.rejtveKapcsolódikToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.rejtveKapcsolódikToolStripMenuItem.Text = "Rejtve kapcsolódik"; + this.rejtveKapcsolódikToolStripMenuItem.Click += new System.EventHandler(this.SetOnlineState); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(289, 6); + // + // fájlKüldéseToolStripMenuItem + // + this.fájlKüldéseToolStripMenuItem.Name = "fájlKüldéseToolStripMenuItem"; + this.fájlKüldéseToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.fájlKüldéseToolStripMenuItem.Text = "Fájl küldése..."; + this.fájlKüldéseToolStripMenuItem.Click += new System.EventHandler(this.SelectPartner); + // + // beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem + // + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Name = "beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem"; + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Text = "Beérkezett fájlok mappájának megnyitása"; + this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Click += new System.EventHandler(this.beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem_Click); + // + // üzenetekElőzményeinekMegtekintéseToolStripMenuItem + // + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Enabled = false; + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Name = "üzenetekElőzményeinekMegtekintéseToolStripMenuItem"; + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Text = "Üzenetek előzményeinek megtekintése..."; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(289, 6); + // + // bezárásToolStripMenuItem + // + this.bezárásToolStripMenuItem.Name = "bezárásToolStripMenuItem"; + this.bezárásToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.bezárásToolStripMenuItem.Text = "Bezárás"; + this.bezárásToolStripMenuItem.Click += new System.EventHandler(this.bezárásToolStripMenuItem_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(289, 6); + // + // kilépésToolStripMenuItem + // + this.kilépésToolStripMenuItem.Name = "kilépésToolStripMenuItem"; + this.kilépésToolStripMenuItem.Size = new System.Drawing.Size(292, 22); + this.kilépésToolStripMenuItem.Text = "Kilépés"; + this.kilépésToolStripMenuItem.Click += new System.EventHandler(this.ExitProgram); + // + // ismerősökToolStripMenuItem + // + this.ismerősökToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ismerősFelvételeToolStripMenuItem, + this.ismerősSzerkesztéseToolStripMenuItem, + this.ismerősTörléseToolStripMenuItem, + this.toolStripMenuItem3, + this.toolStripSeparator5, + this.csoportLétrehozásaToolStripMenuItem, + this.toolStripSeparator6, + this.kategóriaLétrehozásaToolStripMenuItem, + this.kategóriaSzerkesztéseToolStripMenuItem, + this.kategóriaTörléseToolStripMenuItem}); + this.ismerősökToolStripMenuItem.Name = "ismerősökToolStripMenuItem"; + this.ismerősökToolStripMenuItem.Size = new System.Drawing.Size(73, 20); + this.ismerősökToolStripMenuItem.Text = "Ismerősök"; + // + // ismerősFelvételeToolStripMenuItem + // + this.ismerősFelvételeToolStripMenuItem.Name = "ismerősFelvételeToolStripMenuItem"; + this.ismerősFelvételeToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.ismerősFelvételeToolStripMenuItem.Text = "Ismerős felvétele..."; + this.ismerősFelvételeToolStripMenuItem.Click += new System.EventHandler(this.ismerősFelvételeToolStripMenuItem_Click); + // + // ismerősSzerkesztéseToolStripMenuItem + // + this.ismerősSzerkesztéseToolStripMenuItem.Enabled = false; + this.ismerősSzerkesztéseToolStripMenuItem.Name = "ismerősSzerkesztéseToolStripMenuItem"; + this.ismerősSzerkesztéseToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.ismerősSzerkesztéseToolStripMenuItem.Text = "Ismerős szerkesztése..."; + // + // ismerősTörléseToolStripMenuItem + // + this.ismerősTörléseToolStripMenuItem.Enabled = false; + this.ismerősTörléseToolStripMenuItem.Name = "ismerősTörléseToolStripMenuItem"; + this.ismerősTörléseToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.ismerősTörléseToolStripMenuItem.Text = "Ismerős törlése..."; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(199, 22); + this.toolStripMenuItem3.Text = "Ismerős meghivása..."; + this.toolStripMenuItem3.Click += new System.EventHandler(this.InvitePartner); + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(196, 6); + // + // csoportLétrehozásaToolStripMenuItem + // + this.csoportLétrehozásaToolStripMenuItem.Enabled = false; + this.csoportLétrehozásaToolStripMenuItem.Name = "csoportLétrehozásaToolStripMenuItem"; + this.csoportLétrehozásaToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.csoportLétrehozásaToolStripMenuItem.Text = "Csoport létrehozása..."; + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(196, 6); + // + // kategóriaLétrehozásaToolStripMenuItem + // + this.kategóriaLétrehozásaToolStripMenuItem.Enabled = false; + this.kategóriaLétrehozásaToolStripMenuItem.Name = "kategóriaLétrehozásaToolStripMenuItem"; + this.kategóriaLétrehozásaToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.kategóriaLétrehozásaToolStripMenuItem.Text = "Kategória létrehozása..."; + // + // kategóriaSzerkesztéseToolStripMenuItem + // + this.kategóriaSzerkesztéseToolStripMenuItem.Enabled = false; + this.kategóriaSzerkesztéseToolStripMenuItem.Name = "kategóriaSzerkesztéseToolStripMenuItem"; + this.kategóriaSzerkesztéseToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.kategóriaSzerkesztéseToolStripMenuItem.Text = "Kategória szerkesztése..."; + // + // kategóriaTörléseToolStripMenuItem + // + this.kategóriaTörléseToolStripMenuItem.Enabled = false; + this.kategóriaTörléseToolStripMenuItem.Name = "kategóriaTörléseToolStripMenuItem"; + this.kategóriaTörléseToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.kategóriaTörléseToolStripMenuItem.Text = "Kategória törlése..."; + // + // műveletekToolStripMenuItem + // + this.műveletekToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.azonnaliÜzenetKüldéseToolStripMenuItem, + this.egyébKüldéseToolStripMenuItem, + this.toolStripSeparator7, + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem, + this.videóhivásInditásaToolStripMenuItem, + this.onlineFájlokMegtekintéseToolStripMenuItem, + this.közösJátékToolStripMenuItem, + this.távsegitségKéréseToolStripMenuItem}); + this.műveletekToolStripMenuItem.Name = "műveletekToolStripMenuItem"; + this.műveletekToolStripMenuItem.Size = new System.Drawing.Size(74, 20); + this.műveletekToolStripMenuItem.Text = "Műveletek"; + // + // azonnaliÜzenetKüldéseToolStripMenuItem + // + this.azonnaliÜzenetKüldéseToolStripMenuItem.Name = "azonnaliÜzenetKüldéseToolStripMenuItem"; + this.azonnaliÜzenetKüldéseToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.azonnaliÜzenetKüldéseToolStripMenuItem.Text = "Azonnali üzenet küldése..."; + this.azonnaliÜzenetKüldéseToolStripMenuItem.Click += new System.EventHandler(this.SelectPartner); + // + // egyébKüldéseToolStripMenuItem + // + this.egyébKüldéseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.emailKüldéseToolStripMenuItem, + this.fájlKüldéseToolStripMenuItem1}); + this.egyébKüldéseToolStripMenuItem.Name = "egyébKüldéseToolStripMenuItem"; + this.egyébKüldéseToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.egyébKüldéseToolStripMenuItem.Text = "Egyéb küldése"; + // + // emailKüldéseToolStripMenuItem + // + this.emailKüldéseToolStripMenuItem.Enabled = false; + this.emailKüldéseToolStripMenuItem.Name = "emailKüldéseToolStripMenuItem"; + this.emailKüldéseToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.emailKüldéseToolStripMenuItem.Text = "E-mail küldése..."; + // + // fájlKüldéseToolStripMenuItem1 + // + this.fájlKüldéseToolStripMenuItem1.Name = "fájlKüldéseToolStripMenuItem1"; + this.fájlKüldéseToolStripMenuItem1.Size = new System.Drawing.Size(160, 22); + this.fájlKüldéseToolStripMenuItem1.Text = "Fájl küldése..."; + this.fájlKüldéseToolStripMenuItem1.Click += new System.EventHandler(this.SelectPartner); + // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(250, 6); + // + // ismerősSzámitógépénekFelhivásaToolStripMenuItem + // + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem.Enabled = false; + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem.Name = "ismerősSzámitógépénekFelhivásaToolStripMenuItem"; + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.ismerősSzámitógépénekFelhivásaToolStripMenuItem.Text = "Ismerős számitógépének felhivása"; + // + // videóhivásInditásaToolStripMenuItem + // + this.videóhivásInditásaToolStripMenuItem.Enabled = false; + this.videóhivásInditásaToolStripMenuItem.Name = "videóhivásInditásaToolStripMenuItem"; + this.videóhivásInditásaToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.videóhivásInditásaToolStripMenuItem.Text = "Videóhivás inditása..."; + // + // onlineFájlokMegtekintéseToolStripMenuItem + // + this.onlineFájlokMegtekintéseToolStripMenuItem.Enabled = false; + this.onlineFájlokMegtekintéseToolStripMenuItem.Name = "onlineFájlokMegtekintéseToolStripMenuItem"; + this.onlineFájlokMegtekintéseToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.onlineFájlokMegtekintéseToolStripMenuItem.Text = "Online fájlok megtekintése"; + // + // közösJátékToolStripMenuItem + // + this.közösJátékToolStripMenuItem.Enabled = false; + this.közösJátékToolStripMenuItem.Name = "közösJátékToolStripMenuItem"; + this.közösJátékToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.közösJátékToolStripMenuItem.Text = "Közös játék..."; + // + // távsegitségKéréseToolStripMenuItem + // + this.távsegitségKéréseToolStripMenuItem.Enabled = false; + this.távsegitségKéréseToolStripMenuItem.Name = "távsegitségKéréseToolStripMenuItem"; + this.távsegitségKéréseToolStripMenuItem.Size = new System.Drawing.Size(253, 22); + this.távsegitségKéréseToolStripMenuItem.Text = "Távsegitség kérése..."; + // + // eszközökToolStripMenuItem + // + this.eszközökToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.mindigLegfelülToolStripMenuItem, + this.toolStripSeparator8, + this.hangulatjelekToolStripMenuItem, + this.megjelenitendőKépVáltásaToolStripMenuItem, + this.háttérMódositásaToolStripMenuItem, + this.toolStripSeparator9, + this.hangokÉsVideóBeállitásaToolStripMenuItem, + this.toolStripSeparator10, + this.beállitásokToolStripMenuItem, + this.toolStripSeparator14, + this.szkriptíróToolStripMenuItem}); + this.eszközökToolStripMenuItem.Name = "eszközökToolStripMenuItem"; + this.eszközökToolStripMenuItem.Size = new System.Drawing.Size(66, 20); + this.eszközökToolStripMenuItem.Text = "Eszközök"; + // + // mindigLegfelülToolStripMenuItem + // + this.mindigLegfelülToolStripMenuItem.CheckOnClick = true; + this.mindigLegfelülToolStripMenuItem.Name = "mindigLegfelülToolStripMenuItem"; + this.mindigLegfelülToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.mindigLegfelülToolStripMenuItem.Text = "Mindig legfelül"; + this.mindigLegfelülToolStripMenuItem.Click += new System.EventHandler(this.mindigLegfelülToolStripMenuItem_Click); + // + // toolStripSeparator8 + // + this.toolStripSeparator8.Name = "toolStripSeparator8"; + this.toolStripSeparator8.Size = new System.Drawing.Size(224, 6); + // + // hangulatjelekToolStripMenuItem + // + this.hangulatjelekToolStripMenuItem.Name = "hangulatjelekToolStripMenuItem"; + this.hangulatjelekToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.hangulatjelekToolStripMenuItem.Text = "Hangulatjelek..."; + this.hangulatjelekToolStripMenuItem.Click += new System.EventHandler(this.hangulatjelekToolStripMenuItem_Click); + // + // megjelenitendőKépVáltásaToolStripMenuItem + // + this.megjelenitendőKépVáltásaToolStripMenuItem.Name = "megjelenitendőKépVáltásaToolStripMenuItem"; + this.megjelenitendőKépVáltásaToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.megjelenitendőKépVáltásaToolStripMenuItem.Text = "Megjelenitendő kép váltása..."; + this.megjelenitendőKépVáltásaToolStripMenuItem.Click += new System.EventHandler(this.megjelenitendőKépVáltásaToolStripMenuItem_Click); + // + // háttérMódositásaToolStripMenuItem + // + this.háttérMódositásaToolStripMenuItem.Enabled = false; + this.háttérMódositásaToolStripMenuItem.Name = "háttérMódositásaToolStripMenuItem"; + this.háttérMódositásaToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.háttérMódositásaToolStripMenuItem.Text = "Háttér módositása..."; + // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(224, 6); + // + // hangokÉsVideóBeállitásaToolStripMenuItem + // + this.hangokÉsVideóBeállitásaToolStripMenuItem.Enabled = false; + this.hangokÉsVideóBeállitásaToolStripMenuItem.Name = "hangokÉsVideóBeállitásaToolStripMenuItem"; + this.hangokÉsVideóBeállitásaToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.hangokÉsVideóBeállitásaToolStripMenuItem.Text = "Hangok és videó beállitása..."; + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(224, 6); + // + // beállitásokToolStripMenuItem + // + this.beállitásokToolStripMenuItem.Name = "beállitásokToolStripMenuItem"; + this.beállitásokToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.beállitásokToolStripMenuItem.Text = "Beállitások..."; + this.beállitásokToolStripMenuItem.Click += new System.EventHandler(this.beállitásokToolStripMenuItem_Click); + // + // toolStripSeparator14 + // + this.toolStripSeparator14.Name = "toolStripSeparator14"; + this.toolStripSeparator14.Size = new System.Drawing.Size(224, 6); + // + // szkriptíróToolStripMenuItem + // + this.szkriptíróToolStripMenuItem.Name = "szkriptíróToolStripMenuItem"; + this.szkriptíróToolStripMenuItem.Size = new System.Drawing.Size(227, 22); + this.szkriptíróToolStripMenuItem.Text = "Szkriptíró"; + this.szkriptíróToolStripMenuItem.Click += new System.EventHandler(this.szkriptíróToolStripMenuItem_Click); + // + // súgóToolStripMenuItem + // + this.súgóToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.témakörökToolStripMenuItem, + this.toolStripSeparator11, + this.aSzolgáltatásÁllapotsaToolStripMenuItem, + this.adatvédelmiNyilatkozatToolStripMenuItem, + this.használatiFeltételekToolStripMenuItem, + this.visszaélésBejelentéseToolStripMenuItem, + this.toolStripSeparator12, + this.segitsenAProgramTökéletesitésébenToolStripMenuItem, + this.toolStripSeparator13, + this.névjegyToolStripMenuItem}); + this.súgóToolStripMenuItem.Name = "súgóToolStripMenuItem"; + this.súgóToolStripMenuItem.Size = new System.Drawing.Size(46, 20); + this.súgóToolStripMenuItem.Text = "Súgó"; + // + // témakörökToolStripMenuItem + // + this.témakörökToolStripMenuItem.Enabled = false; + this.témakörökToolStripMenuItem.Name = "témakörökToolStripMenuItem"; + this.témakörökToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.témakörökToolStripMenuItem.Text = "Témakörök"; + // + // toolStripSeparator11 + // + this.toolStripSeparator11.Name = "toolStripSeparator11"; + this.toolStripSeparator11.Size = new System.Drawing.Size(267, 6); + // + // aSzolgáltatásÁllapotsaToolStripMenuItem + // + this.aSzolgáltatásÁllapotsaToolStripMenuItem.Enabled = false; + this.aSzolgáltatásÁllapotsaToolStripMenuItem.Name = "aSzolgáltatásÁllapotsaToolStripMenuItem"; + this.aSzolgáltatásÁllapotsaToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.aSzolgáltatásÁllapotsaToolStripMenuItem.Text = "A szolgáltatás állapota"; + // + // adatvédelmiNyilatkozatToolStripMenuItem + // + this.adatvédelmiNyilatkozatToolStripMenuItem.Enabled = false; + this.adatvédelmiNyilatkozatToolStripMenuItem.Name = "adatvédelmiNyilatkozatToolStripMenuItem"; + this.adatvédelmiNyilatkozatToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.adatvédelmiNyilatkozatToolStripMenuItem.Text = "Adatvédelmi nyilatkozat"; + // + // használatiFeltételekToolStripMenuItem + // + this.használatiFeltételekToolStripMenuItem.Enabled = false; + this.használatiFeltételekToolStripMenuItem.Name = "használatiFeltételekToolStripMenuItem"; + this.használatiFeltételekToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.használatiFeltételekToolStripMenuItem.Text = "Használati feltételek"; + // + // visszaélésBejelentéseToolStripMenuItem + // + this.visszaélésBejelentéseToolStripMenuItem.Enabled = false; + this.visszaélésBejelentéseToolStripMenuItem.Name = "visszaélésBejelentéseToolStripMenuItem"; + this.visszaélésBejelentéseToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.visszaélésBejelentéseToolStripMenuItem.Text = "Visszaélés bejelentése"; + // + // toolStripSeparator12 + // + this.toolStripSeparator12.Name = "toolStripSeparator12"; + this.toolStripSeparator12.Size = new System.Drawing.Size(267, 6); + // + // segitsenAProgramTökéletesitésébenToolStripMenuItem + // + this.segitsenAProgramTökéletesitésébenToolStripMenuItem.Enabled = false; + this.segitsenAProgramTökéletesitésébenToolStripMenuItem.Name = "segitsenAProgramTökéletesitésébenToolStripMenuItem"; + this.segitsenAProgramTökéletesitésébenToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.segitsenAProgramTökéletesitésébenToolStripMenuItem.Text = "Segitsen a program tökéletesitésében"; + // + // toolStripSeparator13 + // + this.toolStripSeparator13.Name = "toolStripSeparator13"; + this.toolStripSeparator13.Size = new System.Drawing.Size(267, 6); + // + // névjegyToolStripMenuItem + // + this.névjegyToolStripMenuItem.Name = "névjegyToolStripMenuItem"; + this.névjegyToolStripMenuItem.Size = new System.Drawing.Size(270, 22); + this.névjegyToolStripMenuItem.Text = "Névjegy"; + this.névjegyToolStripMenuItem.Click += new System.EventHandler(this.névjegyToolStripMenuItem_Click); + // + // partnerImages + // + this.partnerImages.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; + this.partnerImages.ImageSize = new System.Drawing.Size(16, 16); + this.partnerImages.TransparentColor = System.Drawing.Color.Transparent; + // + // contactList + // + this.contactList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.contactList.AutoScroll = true; + this.contactList.AutoUpdate = true; + this.contactList.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; + this.contactList.ColumnAutoFill = true; + richListViewColumn1.Text = null; + richListViewColumn1.Width = 50; + richListViewColumn2.Text = null; + richListViewColumn2.Width = 100; + this.contactList.Columns = new SzNPProjects.RichListViewColumn[] { + richListViewColumn1, + richListViewColumn2}; + this.contactList.HeaderHeight = 0; + this.contactList.ItemHeight = 50; + this.contactList.Location = new System.Drawing.Point(3, 40); + this.contactList.Name = "contactList"; + this.contactList.SelectedIndex = -1; + this.contactList.SelectionColor = System.Drawing.Color.Aqua; + this.contactList.Size = new System.Drawing.Size(494, 471); + this.contactList.TabIndex = 0; + this.contactList.ItemDoubleClicked += new System.EventHandler(this.contactList_ItemDoubleClicked); + this.contactList.ItemRightClicked += new System.EventHandler(this.contactList_ItemRightClicked); + // + // MainPanel + // + this.MainPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MainPanel.Controls.Add(this.panel2); + this.MainPanel.Controls.Add(this.searchListView); + this.MainPanel.Controls.Add(this.contactList); + this.MainPanel.Controls.Add(this.statusStrip2); + this.MainPanel.Location = new System.Drawing.Point(150, 24); + this.MainPanel.Name = "MainPanel"; + this.MainPanel.Size = new System.Drawing.Size(500, 536); + this.MainPanel.TabIndex = 9; + // + // searchListView + // + this.searchListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.searchListView.AutoScroll = true; + this.searchListView.AutoUpdate = true; + this.searchListView.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; + this.searchListView.ColumnAutoFill = true; + richListViewColumn3.Text = null; + richListViewColumn3.Width = 50; + richListViewColumn4.Text = null; + richListViewColumn4.Width = 100; + this.searchListView.Columns = new SzNPProjects.RichListViewColumn[] { + richListViewColumn3, + richListViewColumn4}; + this.searchListView.HeaderHeight = 0; + this.searchListView.ItemHeight = 50; + this.searchListView.Location = new System.Drawing.Point(3, 32); + this.searchListView.Name = "searchListView"; + this.searchListView.SelectedIndex = -1; + this.searchListView.SelectionColor = System.Drawing.Color.Aqua; + this.searchListView.Size = new System.Drawing.Size(494, 366); + this.searchListView.TabIndex = 7; + this.searchListView.Visible = false; + // + // statusStrip2 + // + this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.servers, + this.onlineservers, + this.mainserver}); + this.statusStrip2.Location = new System.Drawing.Point(0, 514); + this.statusStrip2.Name = "statusStrip2"; + this.statusStrip2.Size = new System.Drawing.Size(500, 22); + this.statusStrip2.SizingGrip = false; + this.statusStrip2.TabIndex = 6; + // + // servers + // + this.servers.Name = "servers"; + this.servers.Size = new System.Drawing.Size(43, 17); + this.servers.Text = "servers"; + // + // onlineservers + // + this.onlineservers.Name = "onlineservers"; + this.onlineservers.Size = new System.Drawing.Size(76, 17); + this.onlineservers.Text = "onlineservers"; + // + // mainserver + // + this.mainserver.Name = "mainserver"; + this.mainserver.Size = new System.Drawing.Size(366, 17); + this.mainserver.Spring = true; + this.mainserver.Text = "mainserver"; + this.mainserver.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.flowLayoutPanel1.AutoScroll = true; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 24); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(150, 536); + this.flowLayoutPanel1.TabIndex = 10; + this.flowLayoutPanel1.WrapContents = false; + this.flowLayoutPanel1.Click += new System.EventHandler(this.flowLayoutPanel1_Click); + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel2.AutoScroll = true; + this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel2.Location = new System.Drawing.Point(649, 24); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(150, 538); + this.flowLayoutPanel2.TabIndex = 11; + this.flowLayoutPanel2.WrapContents = false; + this.flowLayoutPanel2.Click += new System.EventHandler(this.flowLayoutPanel1_Click); + // + // chatIconMenu + // + this.chatIconMenu.Name = "contextMenuStrip1"; + this.chatIconMenu.Size = new System.Drawing.Size(61, 4); + // + // listPartnerMenu + // + this.listPartnerMenu.Name = "listPartnerMenu"; + this.listPartnerMenu.Size = new System.Drawing.Size(61, 4); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.LightSkyBlue; + this.ClientSize = new System.Drawing.Size(799, 562); + this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.MainPanel); + this.Controls.Add(this.flowLayoutPanel2); + this.MainMenuStrip = this.menuStrip1; + this.MinimumSize = new System.Drawing.Size(500, 300); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Live Messenger - MSGer.tk"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BeforeExit); + this.Load += new System.EventHandler(this.OnMainFormLoad); + this.Controls.SetChildIndex(this.flowLayoutPanel2, 0); + this.Controls.SetChildIndex(this.MainPanel, 0); + this.Controls.SetChildIndex(this.flowLayoutPanel1, 0); + this.Controls.SetChildIndex(this.menuStrip1, 0); + this.iconMenu.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.MainPanel.ResumeLayout(false); + this.MainPanel.PerformLayout(); + this.statusStrip2.ResumeLayout(false); + this.statusStrip2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fájlToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem kijelentkezésToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem állapotToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem elérhetőToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem elfoglaltToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem nincsAGépnélToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem rejtveKapcsolódikToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem fájlKüldéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem üzenetekElőzményeinekMegtekintéseToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem bezárásToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem kilépésToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ismerősökToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ismerősFelvételeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ismerősSzerkesztéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ismerősTörléseToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.ToolStripMenuItem csoportLétrehozásaToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; + private System.Windows.Forms.ToolStripMenuItem kategóriaLétrehozásaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem kategóriaSzerkesztéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem kategóriaTörléseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem műveletekToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem azonnaliÜzenetKüldéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem egyébKüldéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem emailKüldéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem fájlKüldéseToolStripMenuItem1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; + private System.Windows.Forms.ToolStripMenuItem ismerősSzámitógépénekFelhivásaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem videóhivásInditásaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem onlineFájlokMegtekintéseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem közösJátékToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem távsegitségKéréseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem eszközökToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mindigLegfelülToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; + private System.Windows.Forms.ToolStripMenuItem hangulatjelekToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem megjelenitendőKépVáltásaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem háttérMódositásaToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; + private System.Windows.Forms.ToolStripMenuItem hangokÉsVideóBeállitásaToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; + private System.Windows.Forms.ToolStripMenuItem beállitásokToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem súgóToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem témakörökToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator11; + private System.Windows.Forms.ToolStripMenuItem aSzolgáltatásÁllapotsaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem adatvédelmiNyilatkozatToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem használatiFeltételekToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem visszaélésBejelentéseToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; + private System.Windows.Forms.ToolStripMenuItem segitsenAProgramTökéletesitésébenToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; + private System.Windows.Forms.ToolStripMenuItem névjegyToolStripMenuItem; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ImageList partnerImages; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ContextMenuStrip iconMenu; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator18; + public System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; + public System.Windows.Forms.ToolStripMenuItem toolStripMenuItem8; + public System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9; + internal System.Windows.Forms.NotifyIcon notifyIcon1; + internal SzNPProjects.RichListView contactList; + private System.Windows.Forms.Panel MainPanel; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.StatusStrip statusStrip2; + private System.Windows.Forms.ToolStripStatusLabel servers; + private System.Windows.Forms.ToolStripStatusLabel onlineservers; + private System.Windows.Forms.ToolStripStatusLabel mainserver; + private System.Windows.Forms.ContextMenuStrip chatIconMenu; + private System.Windows.Forms.ContextMenuStrip listPartnerMenu; + internal SzNPProjects.RichListView searchListView; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; + private System.Windows.Forms.ToolStripMenuItem szkriptíróToolStripMenuItem; + } +} + diff --git a/MSGer.tk/Forms/MainForm.Events.cs b/MSGer.tk/Forms/MainForm.Events.cs new file mode 100644 index 0000000..d3df9f5 --- /dev/null +++ b/MSGer.tk/Forms/MainForm.Events.cs @@ -0,0 +1,306 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + partial class MainForm + { + private void PopupCloseClick(object sender, EventArgs e) + { + MessageBox.Show("Close"); + } + + private void PopupClick(object sender, EventArgs e) + { + MessageBox.Show("Click"); + } + + private void LoginNewUser(object sender, EventArgs e) + { + Storage.Save(true); //2014.09.19. + Process.Start(((Program.ProcessName.Contains("vshost")) ? Program.ProcessName.Replace(".vshost", "") : Program.ProcessName) + ".exe", "multi"); + } + + public void SetOnlineState(object sender, EventArgs e) + { + int state = 0; + if (sender == elérhetőToolStripMenuItem) + state = 1; + if (sender == elfoglaltToolStripMenuItem) + state = 2; + if (sender == nincsAGépnélToolStripMenuItem) + state = 3; + if (sender == null) //2014.08.30. - Erre nagyon sokáig nem volt felkészítve, és ezt kihasználtam a kijelentkezéshez + { + string resp = Networking.SendRequest(Networking.RequestType.SetState, 0 + "", 0, true); + if (resp.Contains("Fail")) //2015.06.04. + new ErrorHandler(ErrorType.ServerError, new Exception(resp)); //2015.06.04. + new Networking.PacketSender(new Networking.PDLogoutUser()).SendAsync().ContinueWith((t) => + { + CurrentUser.SendChanges = false; //2014.12.31. + CurrentUser.State = state; //2014.08.28. + }); + } + else //else: 2015.04.03. + CurrentUser.State = state; //2014.08.28. + } + + private void SelectPartner(object sender, EventArgs e) + { + var form = new SelectPartnerForm((ToolStripMenuItem)sender); + DialogResult dr = form.ShowDialog(); + if (dr == DialogResult.OK) + { + //2014.04.25. + string[] partners = form.Partners; + List tmplist = new List(); //2015.05.15. + for (int i = 0; i < partners.Length; i++) + { + if (partners[i] != "") //2014.04.17. + { + for (int j = 0; j < UserInfo.KnownUsers.Count; j++) + { + if (!UserInfo.KnownUsers[j].IsPartner) + continue; + int tmp; //2014.04.17. + if (!Int32.TryParse(partners[i], out tmp)) + tmp = -1; + if (UserInfo.KnownUsers[j].UserName == partners[i] || UserInfo.KnownUsers[j].Email == partners[i] || UserInfo.KnownUsers[j].UserID == tmp) + { //Egyezik a név, E-mail vagy ID - UserName: 2014.04.17. + tmplist.Add(UserInfo.KnownUsers[j]); //2015.05.15. + } + } + } + } + if (tmplist.Count != 0) + { + if (sender == fájlKüldéseToolStripMenuItem) + { + ChatPanel tmpchat = ChatPanel.Create(tmplist); + tmpchat.OpenSendFile(); //2015.06.30. + } + if (sender == azonnaliÜzenetKüldéseToolStripMenuItem) + { + ChatPanel.Create(tmplist); + } + } + } + } + + private void ClearSearchBar(object sender, EventArgs e) + { + if (textBox1.Text == Language.Translate(Language.StringID.SearchBar)) + textBox1.Clear(); + } + + private void PutTextInSearchBar(object sender, EventArgs e) + { + if (textBox1.Text == "") + textBox1.Text = Language.Translate(Language.StringID.SearchBar); + } + + public static void OpenSendMessage(int uid) + { + var uinfo = UserInfo.Select(uid); + //Üzenetküldő form + int ChatNum = -1; + for (int i = 0; i < ChatPanel.ChatWindows.Count; i++) + { + if (ChatPanel.ChatWindows[i].ChatPartners.Count == 1 && ChatPanel.ChatWindows[i].ChatPartners.Contains(uinfo)) + { //Vele, és csak vele beszél + ChatNum = i; + break; + } + } + if (ChatNum == -1) + { //Nincs még chatablaka + ChatPanel.Create(new UserInfo[1] { uinfo }); + + } + else + { + ChatPanel.ChatWindows[ChatNum].Show(); + ChatPanel.ChatWindows[ChatNum].Focus(); + } + } + + private void OnMainFormLoad(object sender, EventArgs e) + { + if (CurrentUser.UserID == 0) + Program.Exit(); + + SendLoginToUsers(); //2015.06.16. - Áthelyezve + + LoadPartnerList(); //Be kell töltenie a MainForm-nak, hogy hivatkozhasson rá + + CurrentUser.SendChanges = true; //2014.08.30. + } + + private void InvitePartner(object sender, EventArgs e) + { + (new InvitePartner()).ShowDialog(); + } + + private void BeforeExit(object sender, FormClosingEventArgs e) + { + e.Cancel = true; + this.Hide(); + } + + private void toolStripMenuItem4_Click(object sender, EventArgs e) + { + if (CurrentUser.UserID != 0) //2014.04.18. + { + this.Show(); + this.Focus(); + } + } + + private void ExitProgram(object sender, EventArgs e) + { + Program.Exit(); + } + + private void ismerősFelvételeToolStripMenuItem_Click(object sender, EventArgs e) + { + (new AddPartner()).ShowDialog(); + } + + private void névjegyToolStripMenuItem_Click(object sender, EventArgs e) + { + (new AboutBox1()).ShowDialog(); + } + + private void mindigLegfelülToolStripMenuItem_Click(object sender, EventArgs e) + { + this.TopMost = mindigLegfelülToolStripMenuItem.Checked; + } + + private void beállitásokToolStripMenuItem_Click(object sender, EventArgs e) + { + if (Program.SettingsF == null) + { + Program.SettingsF = new SettingsForm(); + Program.SettingsF.Show(); + } + } + + private void contactList_ItemDoubleClicked(object sender, int e) + { + int uid = UserInfo.GetUserIDFromListID(e); + OpenSendMessage(uid); + } + + private void bezárásToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Hide(); + } + + private void információToolStripMenuItem_Click(object sender, EventArgs e) + { + for (int i = 0; i < UserInfo.KnownUsers.Count; i++) + { + if (UserInfo.KnownUsers[i].TMPListID != (int)((ToolStripMenuItem)sender).GetCurrentParent().Tag) + continue; + (new PartnerInformation(UserInfo.KnownUsers[i])).ShowDialog(); + break; + } + } + + private void contactList_ItemRightClicked(object sender, int e) + { + contactList.Items[e].Selected = true; + listPartnerMenu.Tag = e; + listPartnerMenu.Show(Cursor.Position); + } + + private void PartnerMenu_SendMessage(object sender, EventArgs e) + { + int uid = UserInfo.GetUserIDFromListID((int)((ToolStripMenuItem)sender).GetCurrentParent().Tag); //Erre kattintott jobb gombbal + OpenSendMessage(uid); + } + + private void panel2_Click(object sender, EventArgs e) + { //2014.10.31. + textBox1.Focus(); + } + + private System.Windows.Forms.Timer searchbartimer = new System.Windows.Forms.Timer(); + private void textBox1_TextChanged(object sender, EventArgs e) + { //2014.11.30. 1:33 + var searchlist = searchListView; //2014.12.14. 1:46 + if (searchbartimer.Enabled) + return; + searchbartimer.Interval = 1000; + searchbartimer.Tick += delegate + { + searchbartimer.Stop(); + if (textBox1.Text.Length == 0 || textBox1.Text == Language.Translate(Language.StringID.SearchBar)) //text==translate...: 2014.12.05. + { + searchlist.Visible = false; + contactList.Visible = true; + return; + } + contactList.Visible = false; + searchlist.Parent = contactList.Parent; //2014.12.05. + searchlist.Bounds = contactList.Bounds; + searchlist.Items.Clear(); //2014.12.05. + searchlist.AutoUpdate = false; + foreach (var item in UserInfo.KnownUsers) + { + if (!item.IsPartner) + continue; + if (item.Name.ToLower().Contains(textBox1.Text.ToLower()) || item.Email.ToLower().Contains(textBox1.Text.ToLower()) || item.UserName.ToLower().Contains(textBox1.Text.ToLower())) //ToLower: 2014.12.14. 1:53 + { + item.CreateListItem(searchlist, searchlist.Items.Count); + } + } + searchlist.AutoUpdate = true; + searchlist.Visible = true; + }; + searchbartimer.Start(); + } + + private void flowLayoutPanel1_Click(object sender, EventArgs e) + { + foreach (var item in ChatPanel.ChatWindows) + { + item.Hide(); + } + } + + private void szkriptíróToolStripMenuItem_Click(object sender, EventArgs e) + { + new ScripterWindow().Show(); + } + + private void beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem_Click(object sender, EventArgs e) + { + string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + Path.DirectorySeparatorChar + Language.Translate(Language.StringID.ReceivedFiles); + if (Directory.Exists(path)) + Process.Start(path); + } + + private void megjelenitendőKépVáltásaToolStripMenuItem_Click(object sender, EventArgs e) + { + new SelectShownImage().ShowDialog(); //2015.06.06. + } + + private void hangulatjelekToolStripMenuItem_Click(object sender, EventArgs e) + { + new Emoticons().ShowDialog(); + } + } +} diff --git a/MSGer.tk/Forms/MainForm.cs b/MSGer.tk/Forms/MainForm.cs new file mode 100644 index 0000000..e5a8eaf --- /dev/null +++ b/MSGer.tk/Forms/MainForm.cs @@ -0,0 +1,462 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Net; +using System.IO; +using GlacialComponents.Controls; +using Khendys.Controls; +using System.Threading; +using System.Reflection; +using SzNPProjects; +using System.Net.Sockets; +using System.Diagnostics; +using System.Net.NetworkInformation; + +namespace MSGer.tk +{ + public partial class MainForm : ThemedForms + { + public static Thread PartnerListUpdateThread; //2015.05.15. + public static Notifier taskbarNotifier; + public MainForm() + { + InitializeComponent(); + toolStripMenuItem4.Enabled = false; //2014.04.12. + toolStripMenuItem8.Enabled = false; //2014.04.12. + contactList.Enabled = false; //2014.03.05. + + BeforeLogin.SetText(Language.Translate(Language.StringID.BeforeLogin_TranslateMainF)); + #region Helyi beállitás + fájlToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File); + Language.ReloadEvent += delegate { fájlToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File); }; + kijelentkezésToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Logout); + Language.ReloadEvent += delegate { kijelentkezésToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Logout); }; + toolStripMenuItem1.Text = Language.Translate(Language.StringID.Menu_File_LoginNewUser); + Language.ReloadEvent += delegate { toolStripMenuItem1.Text = Language.Translate(Language.StringID.Menu_File_LoginNewUser); }; + állapotToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status); + Language.ReloadEvent += delegate { állapotToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status); }; + elérhetőToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Online); + Language.ReloadEvent += delegate { elérhetőToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Online); }; + elfoglaltToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Busy); + Language.ReloadEvent += delegate { elfoglaltToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Busy); }; + nincsAGépnélToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Away); + Language.ReloadEvent += delegate { nincsAGépnélToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Away); }; + rejtveKapcsolódikToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Hidden); + Language.ReloadEvent += delegate { rejtveKapcsolódikToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Status_Hidden); }; + fájlKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_SendFile); + Language.ReloadEvent += delegate { fájlKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_SendFile); }; + beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_OpenReceivedFiles); + Language.ReloadEvent += delegate { beérkezettFájlokMappájánakMegnyitásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_OpenReceivedFiles); }; + üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_OpenRecentmsgs); + Language.ReloadEvent += delegate { üzenetekElőzményeinekMegtekintéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_OpenRecentmsgs); }; + bezárásToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Close); + Language.ReloadEvent += delegate { bezárásToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Close); }; + kilépésToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Exit); + Language.ReloadEvent += delegate { kilépésToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_File_Exit); }; + + ismerősökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts); + Language.ReloadEvent += delegate { ismerősökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts); }; + ismerősFelvételeToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Add); + Language.ReloadEvent += delegate { ismerősFelvételeToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Add); }; + ismerősSzerkesztéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Edit); + Language.ReloadEvent += delegate { ismerősSzerkesztéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Edit); }; + ismerősTörléseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Remove); + Language.ReloadEvent += delegate { ismerősTörléseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_Remove); }; + toolStripMenuItem3.Text = Language.Translate(Language.StringID.Menu_Contacts_Invite); + Language.ReloadEvent += delegate { toolStripMenuItem3.Text = Language.Translate(Language.StringID.Menu_Contacts_Invite); }; + csoportLétrehozásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_MakeGroup); + Language.ReloadEvent += delegate { csoportLétrehozásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_MakeGroup); }; + kategóriaLétrehozásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_MakeCategory); + Language.ReloadEvent += delegate { kategóriaLétrehozásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_MakeCategory); }; + kategóriaSzerkesztéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_EditCategory); + Language.ReloadEvent += delegate { kategóriaSzerkesztéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_EditCategory); }; + kategóriaTörléseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_RemoveCategory); + Language.ReloadEvent += delegate { kategóriaTörléseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Contacts_RemoveCategory); }; + + műveletekToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations); + Language.ReloadEvent += delegate { műveletekToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations); }; + azonnaliÜzenetKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Sendmsg) + "..."; + Language.ReloadEvent += delegate { azonnaliÜzenetKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Sendmsg) + "..."; }; + egyébKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_SendOther); + Language.ReloadEvent += delegate { egyébKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_SendOther); }; + emailKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_SendMail); + Language.ReloadEvent += delegate { emailKüldéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_SendMail); }; + fájlKüldéseToolStripMenuItem1.Text = Language.Translate(Language.StringID.Menu_File_SendFile); //Ugyanaz a szöveg + Language.ReloadEvent += delegate { fájlKüldéseToolStripMenuItem1.Text = Language.Translate(Language.StringID.Menu_File_SendFile); }; + ismerősSzámitógépénekFelhivásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_CallContact); + Language.ReloadEvent += delegate { ismerősSzámitógépénekFelhivásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_CallContact); }; + videóhivásInditásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_VideoCall); + Language.ReloadEvent += delegate { videóhivásInditásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_VideoCall); }; + onlineFájlokMegtekintéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_ShowOnlineFiles); + Language.ReloadEvent += delegate { onlineFájlokMegtekintéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_ShowOnlineFiles); }; + közösJátékToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_PlayGame); + Language.ReloadEvent += delegate { közösJátékToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_PlayGame); }; + távsegitségKéréseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_AskForHelp); + Language.ReloadEvent += delegate { távsegitségKéréseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Operations_AskForHelp); }; + + eszközökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools); + Language.ReloadEvent += delegate { eszközökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools); }; + mindigLegfelülToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_AlwaysOnTop); + Language.ReloadEvent += delegate { mindigLegfelülToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_AlwaysOnTop); }; + hangulatjelekToolStripMenuItem.Text = Language.Translate(Language.StringID.Emoticons) + "..."; + Language.ReloadEvent += delegate { hangulatjelekToolStripMenuItem.Text = Language.Translate(Language.StringID.Emoticons) + "..."; }; + megjelenitendőKépVáltásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_ChangeImage); + Language.ReloadEvent += delegate { megjelenitendőKépVáltásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_ChangeImage); }; + háttérMódositásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_ChangeBackground); + Language.ReloadEvent += delegate { háttérMódositásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_ChangeBackground); }; + hangokÉsVideóBeállitásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_VoiceVideoSettings); + Language.ReloadEvent += delegate { hangokÉsVideóBeállitásaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_VoiceVideoSettings); }; + beállitásokToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_Settings); + Language.ReloadEvent += delegate { beállitásokToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Tools_Settings); }; + szkriptíróToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter); + Language.ReloadEvent += delegate { szkriptíróToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter); }; + + súgóToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help); + Language.ReloadEvent += delegate { súgóToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help); }; + témakörökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Contents); + Language.ReloadEvent += delegate { témakörökToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Contents); }; + aSzolgáltatásÁllapotsaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Status); + Language.ReloadEvent += delegate { aSzolgáltatásÁllapotsaToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Status); }; + adatvédelmiNyilatkozatToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_PrivacyPolicy); + Language.ReloadEvent += delegate { adatvédelmiNyilatkozatToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_PrivacyPolicy); }; + használatiFeltételekToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_TermsOfUse); + Language.ReloadEvent += delegate { használatiFeltételekToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_TermsOfUse); }; + visszaélésBejelentéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Report); + Language.ReloadEvent += delegate { visszaélésBejelentéseToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_Report); }; + segitsenAProgramTökéletesitésébenToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_ImproveProgram); + Language.ReloadEvent += delegate { segitsenAProgramTökéletesitésébenToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_ImproveProgram); }; + névjegyToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_About); + Language.ReloadEvent += delegate { névjegyToolStripMenuItem.Text = Language.Translate(Language.StringID.Menu_Help_About); }; + + textBox1.Text = Language.Translate(Language.StringID.SearchBar, textBox1); + + toolStripMenuItem4.Text = Language.Translate(Language.StringID.IconMenu_Show); + Language.ReloadEvent += delegate { toolStripMenuItem4.Text = Language.Translate(Language.StringID.IconMenu_Show); }; + toolStripMenuItem8.Text = Language.Translate(Language.StringID.Menu_File_Logout); + Language.ReloadEvent += delegate { toolStripMenuItem8.Text = Language.Translate(Language.StringID.Menu_File_Logout); }; + toolStripMenuItem9.Text = Language.Translate(Language.StringID.Menu_File_Exit); + Language.ReloadEvent += delegate { toolStripMenuItem9.Text = Language.Translate(Language.StringID.Menu_File_Exit); }; + + LoadMenu(MenuType.ChatIconMenu); //2014.12.12. + LoadMenu(MenuType.PartnerMenu); //2014.12.13. + #endregion + + //this.WindowState = FormWindowState.Minimized; //2014.04.19. + //A betöltő kód áthelyezve a Load()-ba: 2015.05.23. + + // Create the thread object, passing in the Alpha.Beta method + // via a ThreadStart delegate. This does not start the thread. + PartnerListUpdateThread = new Thread(new ThreadStart(new Networking.UpdateListAndChat().Run)); + PartnerListUpdateThread.Name = "Update Partnerlist and Chat"; + + if (Storage.Settings[SettingType.WindowState] == "1") //2014.04.18. - 2014.08.08. + this.WindowState = FormWindowState.Maximized; + else if (Storage.Settings[SettingType.WindowState] == "2") + this.WindowState = FormWindowState.Minimized; + else if (Storage.Settings[SettingType.WindowState] == "3") + this.WindowState = FormWindowState.Normal; + + //taskbarNotifier = new Notifier("popup-bg.bmp", Color.FromArgb(255, 0, 255), "close.bmp", 5000); + //TODO: Notifier + + //taskbarNotifier.Click += PopupClick; + //taskbarNotifier.CloseClick += PopupCloseClick; + + toolStripMenuItem4.Enabled = true; //2014.04.12. + toolStripMenuItem8.Enabled = true; //2014.04.12. + + ChangeChatWindowLayout(false); + + notifyIcon1.Visible = true; //2014.09.22. + //taskbarNotifier.Show("Teszt cím", "Teszt tartalom\nMásodik sor"); + + Language.ReloadEvent += delegate { textBox1.Text = Language.Translate(Language.StringID.SearchBar); }; //2014.12.22. - Nyelvváltáskor törölni fogja a beírt szöveget + } + + public void ChangeChatWindowLayout(bool changed) + { //2015.06.14. + if (Storage.Settings[SettingType.ChatWindow] == "1") + { //2015.06.14. + flowLayoutPanel1.Hide(); + flowLayoutPanel2.Hide(); + MainPanel.Anchor = AnchorStyles.None; + MainPanel.Location = new Point(0, MainPanel.Location.Y); + MainPanel.Width = this.Width; + MainPanel.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; + this.Width -= flowLayoutPanel1.Width + flowLayoutPanel2.Width; + this.SetDesktopLocation(this.DesktopLocation.X + flowLayoutPanel1.Width, this.DesktopLocation.Y); + } + else + { + if (changed) + { + this.SetDesktopLocation(this.DesktopLocation.X - flowLayoutPanel1.Width, this.DesktopLocation.Y); + this.Width += flowLayoutPanel1.Width + flowLayoutPanel2.Width; + MainPanel.Anchor = AnchorStyles.None; + MainPanel.Location = new Point(flowLayoutPanel1.Width + 1, MainPanel.Location.Y); + MainPanel.Width = this.Width - flowLayoutPanel1.Width - flowLayoutPanel2.Width; + MainPanel.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; + flowLayoutPanel1.Show(); + flowLayoutPanel2.Show(); + } + } + } + + private void SendLoginToUsers() + { //2014.12.18. + new Networking.PacketSender(new Networking.PDLoginUser(UserInfo.KnownUsers.Select(entry => new KeyValuePair(entry.UserID, entry.LastUpdate)))) + .SendAsync().ContinueWith(new Action>( + (t) => Networking.ParseUpdateInfo(t.Result.Select(entry => ((Networking.PDLoginUser)entry.EData).RStrings)))); + } + + enum MenuType + { + ChatIconMenu, + PartnerMenu + } + private void LoadMenu(MenuType mt) + { + switch (mt) //2014.12.13. + { + case MenuType.ChatIconMenu: + chatIconMenu.Items.Add(Language.Translate(Language.StringID.Close), null, + new EventHandler((sender, e) => ((ChatPanel)chatIconMenu.Tag).Close())); //Tag: A chatikon + chatIconMenu.Items[chatIconMenu.Items.Count - 1].Name = "close"; //2014.12.22. + Language.ReloadEvent += delegate { chatIconMenu.Items["close"].Text = Language.Translate(Language.StringID.Close); }; //2014.12.22. + chatIconMenu.Items.Add(new ToolStripSeparator()); + LoadMenuPrep(chatIconMenu); + break; + case MenuType.PartnerMenu: + listPartnerMenu.Items.Add(Language.Translate(Language.StringID.Sendmsg) + "...", null, PartnerMenu_SendMessage); + listPartnerMenu.Items[listPartnerMenu.Items.Count - 1].Name = "menu_operations_sendmsg"; //2014.12.22. + Language.ReloadEvent += delegate { listPartnerMenu.Items["menu_operations_sendmsg"].Text = Language.Translate(Language.StringID.Sendmsg) + ".."; }; //2014.12.22. + listPartnerMenu.Items.Add(new ToolStripSeparator()); + LoadMenuPrep(listPartnerMenu); + break; + default: + throw new NotImplementedException("Menu type not implemented."); + } + } + private void LoadMenuPrep(ContextMenuStrip menu) //Csak a menüelemeket készíti elő + { //2014.12.13. + menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { //A dizájnerből, átalakítva, hogy rögtön le is fordítsa + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_SendEmail)), //Ide jönnek majd az event handlerek is + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_CopyEmail)), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_Info)), + new ToolStripSeparator(), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_Block)), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_Remove)), + new ToolStripSeparator(), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_EditName)), + new ToolStripSeparator(), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_EventNotifications)), + new ToolStripSeparator(), + new ToolStripMenuItem(Language.Translate(Language.StringID.Contact_OpenChatLog))}); + Language.ReloadEvent += delegate + { + int i = menu.Items.Count - 1; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_OpenChatLog); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_EventNotifications); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_EditName); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_Remove); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_Block); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_Info); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_CopyEmail); + i--; + menu.Items[i].Text = Language.Translate(Language.StringID.Contact_SendEmail); + }; + } + + public void LoadPartnerList() //2014.08.28. + { + contactList.AutoUpdate = false; + UserInfo.AutoUpdate = false; //2014.09.26. + string[] list = Networking.SendRequest(Networking.RequestType.GetList, "", 0, true).Split(new char[] { 'ͦ' }, StringSplitOptions.RemoveEmptyEntries); //2014.09.26. + if (list[0].Contains("Fail")) + MessageBox.Show(list[0]); + + if (!UserInfo.KnownUsers.Any(entry => entry.UserID == CurrentUser.UserID)) + { + var tmpc = new UserInfo(); //2015.05.15. + tmpc.UserID = CurrentUser.UserID; //2015.05.15. + tmpc.UserName = CurrentUser.UserName; //2015.05.15. + tmpc.LastUpdate = 0; //2015.05.15. + tmpc.Name = CurrentUser.Name; //2015.05.15. + tmpc.IsPartner = false; //2015.05.15. + tmpc.Image = CurrentUser.Image; //2015.06.06. + UserInfo.KnownUsers.Add(tmpc); //2015.05.15. + } + + UserInfo.KnownUsers = UserInfo.KnownUsers.Select(entry => { entry.IsPartner = false; return entry; }).ToList(); //2014.09.26. + for (int i = 0; i + 1 < list.Length; i += 2) + { + string username = list[i]; + int uid = Int32.Parse(list[i + 1]); + if (!UserInfo.IDIsInList(UserInfo.KnownUsers, uid)) + { //Ha nem tud róla semmit, akkor töltse le a felhasználónevét, és jelenítse meg azt + var tmp = new UserInfo(); + tmp.UserID = uid; + tmp.UserName = username; + tmp.LastUpdate = 0; //Lényegében nem tud róla túl sokat, ezért ha lehet, frissítse + tmp.Name = username; + tmp.IsPartner = true; + UserInfo.KnownUsers.Add(tmp); + } + else + { + UserInfo.Select(uid).IsPartner = true; //2014.09.26. + UserInfo.Select(uid).UserName = username; //2014.09.26. - Nem megváltoztatható, ha egy felhasználó megpróbálja, nem foglalkozik vele + UserInfo.Select(uid).State = 0; //2015.06.25. + } + } + CurrentUser.State = 1; //2014.08.31. 0:48 + + UserInfo.AutoUpdate = true; + foreach (var entry in UserInfo.KnownUsers) + { + entry.Update(); //Áthelyeztem, mert az értékek frissítésekor is szükség van rá + } + contactList.AutoUpdate = true; + contactList.Enabled = true; + contactList.Refresh(); + } + + private void LogoutUser(object sender, EventArgs e) + { + this.Hide(); + toolStripMenuItem4.Enabled = false; //2014.04.12. + toolStripMenuItem8.Enabled = false; //2014.04.12. + Storage.Save(true); //2014.08.28. + SetOnlineState(null, null); //2014.04.11. - Erre nincs beállitva, ezért automatikusan 0-ra, azaz kijelentkeztetettre állítja az állapotát + contactList.Items.Clear(); //2014.09.19. + UserInfo.KnownUsers.Clear(); //2014.09.19. + Storage.Dispose(); + PartnerListUpdateThread.Abort();//2015.06.16. + PartnerListUpdateThread = null; + CurrentUser.SendChanges = false; //2014.08.30. + while (ChatPanel.ChatWindows.Count > 0) + { //2014.09.06. - A Close() hatására törli a gyűjteményből, ezért sorra végig fog haladni rajta + ChatPanel.ChatWindows[0].Close(); + } + //LoginDialog = new LoginForm(); //2014.04.04. + var LoginDialog = new LoginForm(); //2015.05.23. + LoginDialog.ShowDialog(); + //Nézzük, sikerült-e + if (CurrentUser.UserID == 0) + Close(); + Storage.Load(true); //2014.08.07. + toolStripMenuItem4.Enabled = true; //2014.04.12. + toolStripMenuItem8.Enabled = true; //2014.04.12. + CurrentUser.SendChanges = true; //2014.08.30. + contactList.Items.Clear(); //2014.10.09. - Kijelentkezéskor hozzáad egy üres listelemet egy (Nem elérhető) felirattal, ezt tünteti el + // Create the thread object, passing in the Alpha.Beta method + // via a ThreadStart delegate. This does not start the thread. + PartnerListUpdateThread = new Thread(new ThreadStart(new Networking.UpdateListAndChat().Run)); + //PartnerListUpdateThread.Name = "Update Partner List"; + PartnerListUpdateThread.Name = "Update Partnerlist and Chat"; //2015.06.30. + + // Start the thread + PartnerListUpdateThread.Start(); + + SendLoginToUsers(); //2014.12.18. + + LoadPartnerList(); + this.Show(); + } + + public void PlaceChatIcon(ChatPanel cp) + { + var newicon = new PictureBox(); + if (cp.ChatPartners[0].Image == null) + newicon.Image = UserInfo.NoImage; //2015.05.30. + else + newicon.Image = cp.ChatPartners[0].Image; //2015.05.30. + newicon.Size = new Size(100, 100); + newicon.SizeMode = PictureBoxSizeMode.Zoom; + newicon.Click += new EventHandler((a, b) => cp.Show()); + newicon.MouseClick += new MouseEventHandler((s, e) => + { + if (e.Button == MouseButtons.Middle) + cp.Close(); + else if (e.Button == MouseButtons.Right) //Chat menü + { //2014.12.13. + chatIconMenu.Tag = cp; + chatIconMenu.Show(Cursor.Position); + } + }); + cp.ChatIcon = newicon; + //--------------------------------------------------------------------- + int size = 0; + bool putright = false; + foreach (Control item in flowLayoutPanel1.Controls) + { + size += item.Size.Height; + } + size += newicon.Size.Height; + if (size > flowLayoutPanel1.Size.Height) + putright = true; //Ha nem fér el bal oldalt, rakja jobbra + //--------------------------------------------------------------------- + size = 0; + foreach (Control item in flowLayoutPanel2.Controls) + { + size += item.Size.Height; + } + size += newicon.Size.Height; + if (size > flowLayoutPanel2.Size.Height) + putright = false; //Ha jobbra sem fér el, csak rakja balra + //--------------------------------------------------------------------- + if (!putright) + flowLayoutPanel1.Controls.Add(newicon); + else + flowLayoutPanel2.Controls.Add(newicon); + } + + public enum StatType + { + MainServer, + Servers, + OnlineServers + } + public void UpdateStats(StatType type, int value) + { //Elvileg ha van forgalom, gyorsan frissíti a nyelvet is + switch (type) + { + case StatType.MainServer: + if (value == 0) + { + mainserver.Text = Language.Translate(Language.StringID.Stats_MainServer) + ": " + Language.Translate(Language.StringID.Stats_NoNetwork); + mainserver.ForeColor = Color.Red; + } + else if (value == 1) + { + mainserver.Text = Language.Translate(Language.StringID.Stats_MainServer) + ": " + Language.Translate(Language.StringID.Stats_Retrying); + mainserver.ForeColor = Color.Orange; + } + else if (value == 2) + { + mainserver.Text = Language.Translate(Language.StringID.Stats_MainServer) + ": " + Language.Translate(Language.StringID.Stats_Connected); + mainserver.ForeColor = Color.Green; + } + break; + case StatType.Servers: + servers.Text = Language.Translate(Language.StringID.Stats_Servers) + ": " + value; + break; + case StatType.OnlineServers: + onlineservers.Text = Language.Translate(Language.StringID.Stats_OnlineServers) + ": " + value; + break; + } + } + } +} diff --git a/MSGer.tk/Forms/MainForm.resx b/MSGer.tk/Forms/MainForm.resx new file mode 100644 index 0000000..03d879b --- /dev/null +++ b/MSGer.tk/Forms/MainForm.resx @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WLM 2009 Logo base64-encoded probably - Spent hours on the correct sed command + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 530, 17 + + + + WLM 2009 Logo base64-encoded probably - Spent hours on the correct sed command + + + 130, 17 + + + 245, 17 + + + 791, 17 + + + 636, 17 + + + 907, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/Notifier.Designer.cs b/MSGer.tk/Forms/Notifier.Designer.cs new file mode 100644 index 0000000..cff2ac5 --- /dev/null +++ b/MSGer.tk/Forms/Notifier.Designer.cs @@ -0,0 +1,99 @@ +namespace MSGer.tk +{ + partial class Notifier + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.CloseButton = new System.Windows.Forms.PictureBox(); + this.Title = new System.Windows.Forms.Label(); + this.Content = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.CloseButton)).BeginInit(); + this.SuspendLayout(); + // + // CloseButton + // + this.CloseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.CloseButton.Location = new System.Drawing.Point(241, 12); + this.CloseButton.Name = "CloseButton"; + this.CloseButton.Size = new System.Drawing.Size(31, 28); + this.CloseButton.TabIndex = 0; + this.CloseButton.TabStop = false; + this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click); + // + // Title + // + this.Title.AutoSize = true; + this.Title.BackColor = System.Drawing.Color.Transparent; + this.Title.Location = new System.Drawing.Point(35, 26); + this.Title.Name = "Title"; + this.Title.Size = new System.Drawing.Size(33, 13); + this.Title.TabIndex = 1; + this.Title.Text = "Teszt"; + // + // Content + // + this.Content.AutoSize = true; + this.Content.BackColor = System.Drawing.Color.Transparent; + this.Content.Location = new System.Drawing.Point(12, 58); + this.Content.Name = "Content"; + this.Content.Size = new System.Drawing.Size(33, 26); + this.Content.TabIndex = 2; + this.Content.Text = "Teszt\r\nAsd"; + // + // Notifier + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(284, 262); + this.ControlBox = false; + this.Controls.Add(this.Content); + this.Controls.Add(this.Title); + this.Controls.Add(this.CloseButton); + this.Cursor = System.Windows.Forms.Cursors.Hand; + this.ForeColor = System.Drawing.Color.Black; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Notifier"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.TopMost = true; + ((System.ComponentModel.ISupportInitialize)(this.CloseButton)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox CloseButton; + private System.Windows.Forms.Label Title; + private System.Windows.Forms.Label Content; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/Notifier.cs b/MSGer.tk/Forms/Notifier.cs new file mode 100644 index 0000000..467ded7 --- /dev/null +++ b/MSGer.tk/Forms/Notifier.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class Notifier : Form + { //2014.04.15. + private Rectangle WorkAreaRectangle; + private Timer NotifierTimer; + + public event EventHandler CloseClick; //2014.08.29. + public Notifier(string background, Color TransparentColor, string closebutton, int waittime) //waittime: 2014.04.17. + { + if (!File.Exists(background)) + throw new FileNotFoundException("A megadott háttér nem található."); + if (!File.Exists(closebutton)) + throw new FileNotFoundException("A megadott bezáró ikon nem található."); + InitializeComponent(); + this.BackgroundImage = Program.LoadImageFromFile(background); //2015.06.06. + this.TransparencyKey = TransparentColor; + CloseButton.Image = Program.LoadImageFromFile(background); //2015.06.06. + var size = CloseButton.Image.Size; //2015.06.06. + CloseButton.Left = CloseButton.Right - size.Width; //2014.08.29. + CloseButton.Width = size.Width; //2014.08.29. + CloseButton.Height = size.Height; //2014.08.29. + NotifierTimer = new Timer(); + NotifierTimer.Interval = waittime; + NotifierTimer.Tick += NotifierTimer_Tick; + } + + void NotifierTimer_Tick(object sender, EventArgs e) + { + NotifierTimer.Stop(); + this.Hide(); + } + + public Notifier(Image background, Color TransparentColor, Image closebutton, int waittime) //waittime: 2014.08.28. + { + InitializeComponent(); + this.BackgroundImage = background; + this.TransparencyKey = TransparentColor; + CloseButton.Image = closebutton; + } + public void Show(string title, string content) //(kép) - 2014.04.15. + { + WorkAreaRectangle = Screen.GetWorkingArea(WorkAreaRectangle); //2014.04.17. + Title.Text = title; + Content.Text = content; + this.WindowState = FormWindowState.Normal; + SetBounds(WorkAreaRectangle.Right - BackgroundImage.Width - 17, WorkAreaRectangle.Bottom - 100, BackgroundImage.Width, 100); + this.Show(); + NotifierTimer.Start(); + } + + private void CloseButton_Click(object sender, EventArgs e) + { //2014.08.29. + CloseClick(sender, e); + } + } +} diff --git a/MSGer.tk/Forms/Notifier.resx b/MSGer.tk/Forms/Notifier.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/Notifier.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/PartnerInformation.Designer.cs b/MSGer.tk/Forms/PartnerInformation.Designer.cs new file mode 100644 index 0000000..bca1828 --- /dev/null +++ b/MSGer.tk/Forms/PartnerInformation.Designer.cs @@ -0,0 +1,182 @@ +namespace MSGer.tk +{ + partial class PartnerInformation + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.nameTextBox = new Khendys.Controls.ExRichTextBox(); + this.messageTextBox = new Khendys.Controls.ExRichTextBox(); + this.statusLabel = new System.Windows.Forms.Label(); + this.userName1 = new System.Windows.Forms.Label(); + this.userName2 = new System.Windows.Forms.Label(); + this.userID1 = new System.Windows.Forms.Label(); + this.userID2 = new System.Windows.Forms.Label(); + this.email2 = new System.Windows.Forms.Label(); + this.email1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(100, 100); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // nameTextBox + // + this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.nameTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.nameTextBox.HiglightColor = Khendys.Controls.RtfColor.White; + this.nameTextBox.Location = new System.Drawing.Point(119, 12); + this.nameTextBox.Multiline = false; + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.ReadOnly = true; + this.nameTextBox.Size = new System.Drawing.Size(445, 30); + this.nameTextBox.TabIndex = 1; + this.nameTextBox.Text = "ShownName"; + this.nameTextBox.TextColor = Khendys.Controls.RtfColor.Black; + // + // messageTextBox + // + this.messageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.messageTextBox.HiglightColor = Khendys.Controls.RtfColor.White; + this.messageTextBox.Location = new System.Drawing.Point(119, 57); + this.messageTextBox.Name = "messageTextBox"; + this.messageTextBox.ReadOnly = true; + this.messageTextBox.Size = new System.Drawing.Size(445, 55); + this.messageTextBox.TabIndex = 2; + this.messageTextBox.Text = "User Message\nLine"; + this.messageTextBox.TextColor = Khendys.Controls.RtfColor.Black; + // + // statusLabel + // + this.statusLabel.AutoSize = true; + this.statusLabel.Location = new System.Drawing.Point(119, 38); + this.statusLabel.Name = "statusLabel"; + this.statusLabel.Size = new System.Drawing.Size(63, 13); + this.statusLabel.TabIndex = 3; + this.statusLabel.Text = "StatusLabel"; + // + // userName1 + // + this.userName1.AutoSize = true; + this.userName1.Location = new System.Drawing.Point(12, 120); + this.userName1.Name = "userName1"; + this.userName1.Size = new System.Drawing.Size(63, 13); + this.userName1.TabIndex = 4; + this.userName1.Text = "UserName1"; + // + // userName2 + // + this.userName2.AutoSize = true; + this.userName2.Location = new System.Drawing.Point(119, 120); + this.userName2.Name = "userName2"; + this.userName2.Size = new System.Drawing.Size(63, 13); + this.userName2.TabIndex = 5; + this.userName2.Text = "UserName2"; + // + // userID1 + // + this.userID1.AutoSize = true; + this.userID1.Location = new System.Drawing.Point(12, 135); + this.userID1.Name = "userID1"; + this.userID1.Size = new System.Drawing.Size(46, 13); + this.userID1.TabIndex = 6; + this.userID1.Text = "UserID1"; + // + // userID2 + // + this.userID2.AutoSize = true; + this.userID2.Location = new System.Drawing.Point(119, 135); + this.userID2.Name = "userID2"; + this.userID2.Size = new System.Drawing.Size(46, 13); + this.userID2.TabIndex = 7; + this.userID2.Text = "UserID2"; + // + // email2 + // + this.email2.AutoSize = true; + this.email2.Location = new System.Drawing.Point(119, 150); + this.email2.Name = "email2"; + this.email2.Size = new System.Drawing.Size(38, 13); + this.email2.TabIndex = 9; + this.email2.Text = "Email2"; + // + // email1 + // + this.email1.AutoSize = true; + this.email1.Location = new System.Drawing.Point(12, 150); + this.email1.Name = "email1"; + this.email1.Size = new System.Drawing.Size(38, 13); + this.email1.TabIndex = 8; + this.email1.Text = "Email1"; + // + // PartnerInformation + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(576, 273); + this.Controls.Add(this.email2); + this.Controls.Add(this.email1); + this.Controls.Add(this.userID2); + this.Controls.Add(this.userID1); + this.Controls.Add(this.userName2); + this.Controls.Add(this.userName1); + this.Controls.Add(this.statusLabel); + this.Controls.Add(this.messageTextBox); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(this.pictureBox1); + this.Name = "PartnerInformation"; + this.Text = "PartnerInformation"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private Khendys.Controls.ExRichTextBox nameTextBox; + private Khendys.Controls.ExRichTextBox messageTextBox; + private System.Windows.Forms.Label statusLabel; + private System.Windows.Forms.Label userName1; + private System.Windows.Forms.Label userName2; + private System.Windows.Forms.Label userID1; + private System.Windows.Forms.Label userID2; + private System.Windows.Forms.Label email2; + private System.Windows.Forms.Label email1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/PartnerInformation.cs b/MSGer.tk/Forms/PartnerInformation.cs new file mode 100644 index 0000000..36cd02b --- /dev/null +++ b/MSGer.tk/Forms/PartnerInformation.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class PartnerInformation : ThemedForms + { + public PartnerInformation(UserInfo uinfo) + { + InitializeComponent(); + + nameTextBox.BackColor = this.BackColor; + messageTextBox.BackColor = this.BackColor; + pictureBox1.Image = uinfo.Image; //2015.05.30. + nameTextBox.Text = uinfo.Name; + if (uinfo.State == 1) + statusLabel.Text = Language.Translate(Language.StringID.Menu_File_Status_Online); + else if (uinfo.State == 2) + statusLabel.Text = Language.Translate(Language.StringID.Menu_File_Status_Busy); + else if (uinfo.State == 3) + statusLabel.Text = Language.Translate(Language.StringID.Menu_File_Status_Away); + else + statusLabel.Text = ""; + messageTextBox.Text = uinfo.Message; + userName1.Text = Language.Translate(Language.StringID.UserName) + ":"; + userName2.Text = uinfo.UserName; + userID1.Text = Language.Translate(Language.StringID.UserID); + userID2.Text = uinfo.UserID.ToString(); + email1.Text = "E-mail:"; + email2.Text = uinfo.Email; + } + } +} diff --git a/MSGer.tk/Forms/PartnerInformation.resx b/MSGer.tk/Forms/PartnerInformation.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/PartnerInformation.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/ScripterWindow.Designer.cs b/MSGer.tk/Forms/ScripterWindow.Designer.cs new file mode 100644 index 0000000..3a72bf9 --- /dev/null +++ b/MSGer.tk/Forms/ScripterWindow.Designer.cs @@ -0,0 +1,169 @@ +namespace MSGer.tk +{ + partial class ScripterWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.codeTextBox = new System.Windows.Forms.RichTextBox(); + this.compilerResultTextBox = new System.Windows.Forms.RichTextBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // codeTextBox + // + this.codeTextBox.AcceptsTab = true; + this.codeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.codeTextBox.BackColor = System.Drawing.Color.White; + this.codeTextBox.Location = new System.Drawing.Point(12, 36); + this.codeTextBox.Name = "codeTextBox"; + this.codeTextBox.Size = new System.Drawing.Size(502, 229); + this.codeTextBox.TabIndex = 0; + this.codeTextBox.Text = ""; + this.codeTextBox.TextChanged += new System.EventHandler(this.codeTextBox_TextChanged); + // + // compilerResultTextBox + // + this.compilerResultTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.compilerResultTextBox.BackColor = System.Drawing.Color.White; + this.compilerResultTextBox.Location = new System.Drawing.Point(12, 296); + this.compilerResultTextBox.Name = "compilerResultTextBox"; + this.compilerResultTextBox.ReadOnly = true; + this.compilerResultTextBox.Size = new System.Drawing.Size(502, 93); + this.compilerResultTextBox.TabIndex = 1; + this.compilerResultTextBox.Text = ""; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(526, 24); + this.menuStrip1.TabIndex = 2; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.saveToolStripMenuItem, + this.toolStripSeparator1, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.newToolStripMenuItem.Text = "New"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.openToolStripMenuItem.Text = "Open"; + this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.saveToolStripMenuItem.Text = "Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(100, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.exitToolStripMenuItem.Text = "Exit"; + // + // saveFileDialog1 + // + this.saveFileDialog1.RestoreDirectory = true; + // + // openFileDialog1 + // + this.openFileDialog1.Filter = "C# files|*.cs|All files|*.*"; + this.openFileDialog1.RestoreDirectory = true; + // + // ScripterWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(526, 401); + this.Controls.Add(this.compilerResultTextBox); + this.Controls.Add(this.codeTextBox); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "ScripterWindow"; + this.Text = "ScripterWindow"; + this.Controls.SetChildIndex(this.menuStrip1, 0); + this.Controls.SetChildIndex(this.codeTextBox, 0); + this.Controls.SetChildIndex(this.compilerResultTextBox, 0); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.RichTextBox codeTextBox; + private System.Windows.Forms.RichTextBox compilerResultTextBox; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/ScripterWindow.cs b/MSGer.tk/Forms/ScripterWindow.cs new file mode 100644 index 0000000..48a4d29 --- /dev/null +++ b/MSGer.tk/Forms/ScripterWindow.cs @@ -0,0 +1,108 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class ScripterWindow : ThemedForms + { + public ScripterWindow() + { + InitializeComponent(); + newToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_New); + Language.ReloadEvent += delegate { newToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_New); }; + openToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Open); + Language.ReloadEvent += delegate { openToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Open); }; + saveToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Save); + Language.ReloadEvent += delegate { saveToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Save); }; + exitToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Exit); + Language.ReloadEvent += delegate { exitToolStripMenuItem.Text = Language.Translate(Language.StringID.Scripter_Exit); }; + + timer.Tick += timer_Tick; //2015.04.10. + } + public string Path; + public void LoadScript(string path) + { + if (!File.Exists(path)) + { //2015.04.06. + MessageBox.Show(Language.Translate(Language.StringID.ScriptNotFound), Language.Translate(Language.StringID.Error)); + return; + } + Path = path; + } + public void UpdateMessages() + { //2015.04.06. + if (Path == null) + return; + File.WriteAllText(Path, codeTextBox.Text); //2015.04.10. + ScriptLoader script = new ScriptLoader(Path); + var messages = script.JustCompile(); + if (messages == null) + { + MessageBox.Show(Language.Translate(Language.StringID.ScriptUnloadRequired), Language.Translate(Language.StringID.Error)); + return; + } + compilerResultTextBox.SuspendLayout(); //2015.04.10. + compilerResultTextBox.Clear(); //2015.04.10. + foreach (CompilerError message in messages) + { + Color color; //2015.04.10. + if (message.IsWarning) + color = Color.DarkOrange; //2015.04.10. + else + color = Color.Red; + compilerResultTextBox.AppendText("(Col:" + message.Column + ",Line:" + message.Line + ") " + message.ErrorNumber + ": " + message.ErrorText + "\n", color); //2015.04.10. + } + compilerResultTextBox.ResumeLayout(true); //2015.04.10. + } + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { //2015.04.06. + if (saveFileDialog1.ShowDialog() == DialogResult.OK) + { + saveFileDialog1.OpenFile().Dispose(); + Path = saveFileDialog1.FileName; + } + } + + private void openToolStripMenuItem_Click(object sender, EventArgs e) + { //2015.04.06. + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + if (!File.Exists(openFileDialog1.FileName)) + return; + Path = openFileDialog1.FileName; + codeTextBox.Text = File.ReadAllText(Path); + } + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { //2015.04.06. + File.WriteAllText(Path, codeTextBox.Text); + } + + private Timer timer = new Timer { Enabled = false, Interval = 1000 }; //2015.04.10. + private void codeTextBox_TextChanged(object sender, EventArgs e) + { //2015.04.06. + if (!timer.Enabled) + { + UpdateMessages(); + timer.Start(); + } + } + + void timer_Tick(object sender, EventArgs e) + { + timer.Stop(); + UpdateMessages(); + } + } +} diff --git a/MSGer.tk/Forms/ScripterWindow.resx b/MSGer.tk/Forms/ScripterWindow.resx new file mode 100644 index 0000000..d09025b --- /dev/null +++ b/MSGer.tk/Forms/ScripterWindow.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 132, 17 + + + 268, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SelectPartnerForm.Designer.cs b/MSGer.tk/Forms/SelectPartnerForm.Designer.cs new file mode 100644 index 0000000..578fd72 --- /dev/null +++ b/MSGer.tk/Forms/SelectPartnerForm.Designer.cs @@ -0,0 +1,180 @@ +namespace MSGer.tk +{ + partial class SelectPartnerForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + GlacialComponents.Controls.GLColumn glColumn1 = new GlacialComponents.Controls.GLColumn(); + GlacialComponents.Controls.GLItem glItem1 = new GlacialComponents.Controls.GLItem(); + GlacialComponents.Controls.GLSubItem glSubItem1 = new GlacialComponents.Controls.GLSubItem(); + this.partnerList = new GlacialComponents.Controls.GlacialList(); + this.selectedPartners = new System.Windows.Forms.TextBox(); + this.okbtn = new System.Windows.Forms.Button(); + this.cancelbtn = new System.Windows.Forms.Button(); + this.titleText = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // partnerList + // + this.partnerList.AllowColumnResize = false; + this.partnerList.AllowMultiselect = true; + this.partnerList.AlternateBackground = System.Drawing.Color.DarkGreen; + this.partnerList.AlternatingColors = false; + this.partnerList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.partnerList.AutoHeight = true; + this.partnerList.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.partnerList.BackgroundStretchToFit = true; + glColumn1.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn1.CheckBoxes = true; + glColumn1.ImageIndex = -1; + glColumn1.Name = "PartnerName"; + glColumn1.NumericSort = false; + glColumn1.Text = ""; + glColumn1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn1.Width = 100; + this.partnerList.Columns.AddRange(new GlacialComponents.Controls.GLColumn[] { + glColumn1}); + this.partnerList.ControlStyle = GlacialComponents.Controls.GLControlStyles.Normal; + this.partnerList.ForeColor = System.Drawing.Color.Black; + this.partnerList.FullRowSelect = true; + this.partnerList.GridColor = System.Drawing.Color.LightGray; + this.partnerList.GridLines = GlacialComponents.Controls.GLGridLines.gridBoth; + this.partnerList.GridLineStyle = GlacialComponents.Controls.GLGridLineStyles.gridNone; + this.partnerList.GridTypes = GlacialComponents.Controls.GLGridTypes.gridOnExists; + this.partnerList.HeaderHeight = 0; + this.partnerList.HeaderVisible = false; + this.partnerList.HeaderWordWrap = false; + this.partnerList.HotColumnTracking = false; + this.partnerList.HotItemTracking = true; + this.partnerList.HotTrackingColor = System.Drawing.Color.LightGray; + this.partnerList.HoverEvents = false; + this.partnerList.HoverTime = 1; + this.partnerList.ImageList = null; + this.partnerList.ItemHeight = 17; + glItem1.BackColor = System.Drawing.Color.White; + glItem1.ForeColor = System.Drawing.Color.Black; + glItem1.RowBorderColor = System.Drawing.Color.Black; + glItem1.RowBorderSize = 0; + glSubItem1.BackColor = System.Drawing.Color.Empty; + glSubItem1.Checked = false; + glSubItem1.ForceText = false; + glSubItem1.ForeColor = System.Drawing.Color.Black; + glSubItem1.ImageAlignment = System.Windows.Forms.HorizontalAlignment.Left; + glSubItem1.ImageIndex = -1; + glSubItem1.Text = "Test"; + glItem1.SubItems.AddRange(new GlacialComponents.Controls.GLSubItem[] { + glSubItem1}); + glItem1.Text = "Test"; + this.partnerList.Items.AddRange(new GlacialComponents.Controls.GLItem[] { + glItem1}); + this.partnerList.ItemWordWrap = false; + this.partnerList.Location = new System.Drawing.Point(13, 26); + this.partnerList.Name = "partnerList"; + this.partnerList.Selectable = true; + this.partnerList.SelectedTextColor = System.Drawing.Color.White; + this.partnerList.SelectionColor = System.Drawing.Color.DarkBlue; + this.partnerList.ShowBorder = true; + this.partnerList.ShowFocusRect = true; + this.partnerList.Size = new System.Drawing.Size(359, 286); + this.partnerList.SortType = GlacialComponents.Controls.SortTypes.InsertionSort; + this.partnerList.SuperFlatHeaderColor = System.Drawing.Color.White; + this.partnerList.TabIndex = 0; + this.partnerList.Click += new System.EventHandler(this.ItemClicked); + this.partnerList.DoubleClick += new System.EventHandler(this.ItemDoubleClick); + // + // selectedPartners + // + this.selectedPartners.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.selectedPartners.Location = new System.Drawing.Point(13, 319); + this.selectedPartners.Multiline = true; + this.selectedPartners.Name = "selectedPartners"; + this.selectedPartners.Size = new System.Drawing.Size(359, 103); + this.selectedPartners.TabIndex = 1; + // + // okbtn + // + this.okbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okbtn.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okbtn.Location = new System.Drawing.Point(215, 428); + this.okbtn.Name = "okbtn"; + this.okbtn.Size = new System.Drawing.Size(75, 23); + this.okbtn.TabIndex = 2; + this.okbtn.Text = "OK"; + this.okbtn.UseVisualStyleBackColor = true; + this.okbtn.Click += new System.EventHandler(this.okbtn_Click); + // + // cancelbtn + // + this.cancelbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelbtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelbtn.Location = new System.Drawing.Point(297, 429); + this.cancelbtn.Name = "cancelbtn"; + this.cancelbtn.Size = new System.Drawing.Size(75, 23); + this.cancelbtn.TabIndex = 3; + this.cancelbtn.Text = "Mégse"; + this.cancelbtn.UseVisualStyleBackColor = true; + // + // titleText + // + this.titleText.AutoSize = true; + this.titleText.Location = new System.Drawing.Point(13, 7); + this.titleText.Name = "titleText"; + this.titleText.Size = new System.Drawing.Size(53, 13); + this.titleText.TabIndex = 4; + this.titleText.Text = "Unknown"; + // + // SelectPartnerForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.LightSkyBlue; + this.ClientSize = new System.Drawing.Size(384, 462); + this.Controls.Add(this.titleText); + this.Controls.Add(this.cancelbtn); + this.Controls.Add(this.okbtn); + this.Controls.Add(this.selectedPartners); + this.Controls.Add(this.partnerList); + this.Name = "SelectPartnerForm"; + this.Text = "Partnerválasztás"; + this.ResizeEnd += new System.EventHandler(this.FormResizeFinish); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private GlacialComponents.Controls.GlacialList partnerList; + private System.Windows.Forms.TextBox selectedPartners; + private System.Windows.Forms.Button okbtn; + private System.Windows.Forms.Button cancelbtn; + private System.Windows.Forms.Label titleText; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/SelectPartnerForm.cs b/MSGer.tk/Forms/SelectPartnerForm.cs new file mode 100644 index 0000000..27094ae --- /dev/null +++ b/MSGer.tk/Forms/SelectPartnerForm.cs @@ -0,0 +1,93 @@ +using GlacialComponents.Controls; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SelectPartnerForm : ThemedForms + { + public SelectPartnerForm(ToolStripMenuItem SelectPartnerSender) //paraméter: 2014.09.06. + { + InitializeComponent(); + this.Text = SelectPartnerSender.Text; //2014.02.28. + titleText.Text = SelectPartnerSender.Text; + + cancelbtn.Text = Language.Translate(Language.StringID.Button_Cancel); + + partnerList.Items.Clear(); + for (int x = 0; x < UserInfo.KnownUsers.Count; x++) //Partners + { + if (!UserInfo.KnownUsers[x].IsPartner) + continue; + try + { + partnerList.Items.Add(UserInfo.KnownUsers[x].UserName); + } + catch (NullReferenceException) + { + break; + } + catch (Exception e) + { + MessageBox.Show(e.Message); + break; + } + } + partnerList.Columns[0].Width = partnerList.ClientSize.Width - 5; + } + + private void FormResizeFinish(object sender, EventArgs e) + { + partnerList.Columns[0].Width = partnerList.ClientSize.Width - 5; + } + + private void ItemClicked(object sender, EventArgs e) + { + for (int i = 0; i < partnerList.Items.Count; i++) + { + if (partnerList.Items[i].SubItems[0].Checked) + { + int p = selectedPartners.Text.IndexOf(partnerList.Items[i].SubItems[0].Text + ";"); + if (p == -1) + { + selectedPartners.Text += partnerList.Items[i].SubItems[0].Text + ";"; + } + } + else + { + int p = selectedPartners.Text.IndexOf(partnerList.Items[i].SubItems[0].Text + ";"); + if (p != -1) //Eltávolitja a nem kiválasztott partner előfordulását a listából - Megcsinálom visszafelé is + selectedPartners.Text = selectedPartners.Text.Remove(p, partnerList.Items[i].SubItems[0].Text.Length + 1); //Eltávolitja a ;-t is + } + } + } + + private void ItemDoubleClick(object sender, EventArgs e) + { + int a = partnerList.HotItemIndex; + if (partnerList.Items[a].SubItems[0].Checked) + partnerList.Items[a].SubItems[0].Checked = false; + else + partnerList.Items[a].SubItems[0].Checked = true; + ItemClicked(sender, e); + } + + public string[] Partners; + private void okbtn_Click(object sender, EventArgs e) + { + while (selectedPartners.Text.Contains(' ')) + { //Eltávolitja a szóközöket + int x = selectedPartners.Text.IndexOf(' '); + selectedPartners.Text.Remove(x, 1); + } + Partners = selectedPartners.Text.Split(';'); + } + } +} diff --git a/MSGer.tk/Forms/SelectPartnerForm.resx b/MSGer.tk/Forms/SelectPartnerForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SelectPartnerForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SelectShownImage.Designer.cs b/MSGer.tk/Forms/SelectShownImage.Designer.cs new file mode 100644 index 0000000..34330db --- /dev/null +++ b/MSGer.tk/Forms/SelectShownImage.Designer.cs @@ -0,0 +1,136 @@ +namespace MSGer.tk +{ + partial class SelectShownImage + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.button1 = new System.Windows.Forms.Button(); + this.cancelbtn = new System.Windows.Forms.Button(); + this.okbtn = new System.Windows.Forms.Button(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(191, 29); + this.label1.TabIndex = 0; + this.label1.Text = "Kép kiválasztása"; + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.Location = new System.Drawing.Point(18, 59); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(164, 164); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 1; + this.pictureBox1.TabStop = false; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(197, 59); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Módosítás..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // cancelbtn + // + this.cancelbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelbtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelbtn.Location = new System.Drawing.Point(197, 269); + this.cancelbtn.Name = "cancelbtn"; + this.cancelbtn.Size = new System.Drawing.Size(75, 23); + this.cancelbtn.TabIndex = 3; + this.cancelbtn.Text = "Mégse"; + this.cancelbtn.UseVisualStyleBackColor = true; + // + // okbtn + // + this.okbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okbtn.Location = new System.Drawing.Point(116, 269); + this.okbtn.Name = "okbtn"; + this.okbtn.Size = new System.Drawing.Size(75, 23); + this.okbtn.TabIndex = 4; + this.okbtn.Text = "OK"; + this.okbtn.UseVisualStyleBackColor = true; + this.okbtn.Click += new System.EventHandler(this.okbtn_Click); + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.Filter = "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|All Image Types|" + + "*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff"; + this.openFileDialog1.RestoreDirectory = true; + // + // SelectShownImage + // + this.AcceptButton = this.okbtn; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelbtn; + this.ClientSize = new System.Drawing.Size(284, 304); + this.Controls.Add(this.okbtn); + this.Controls.Add(this.cancelbtn); + this.Controls.Add(this.button1); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SelectShownImage"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "SelectShownImage"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button cancelbtn; + private System.Windows.Forms.Button okbtn; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/SelectShownImage.cs b/MSGer.tk/Forms/SelectShownImage.cs new file mode 100644 index 0000000..2a0ae89 --- /dev/null +++ b/MSGer.tk/Forms/SelectShownImage.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SelectShownImage : ThemedForms + { //2015.05.24. + public SelectShownImage() + { + InitializeComponent(); + label1.Text = Language.Translate(Language.StringID.SelectImage); //2015.06.06. + button1.Text = Language.Translate(Language.StringID.Modify); //2015.06.06. + this.Text = label1.Text; //2015.06.06. + cancelbtn.Text = Language.Translate(Language.StringID.Button_Cancel); //2015.06.06. + pictureBox1.Image = CurrentUser.Image.Clone() as Image; //2015.06.06. + openFileDialog1.Filter = "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|" + + "All Graphics Types|*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff"; //2015.06.06. + } + + private void button1_Click(object sender, EventArgs e) + { //2015.06.06. + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + pictureBox1.Image = Program.LoadImageFromFile(openFileDialog1.FileName); + } + } + + private void okbtn_Click(object sender, EventArgs e) + { //2015.06.06. + CurrentUser.Image = pictureBox1.Image; + this.Close(); + } + } +} diff --git a/MSGer.tk/Forms/SelectShownImage.resx b/MSGer.tk/Forms/SelectShownImage.resx new file mode 100644 index 0000000..3a7d671 --- /dev/null +++ b/MSGer.tk/Forms/SelectShownImage.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsForm.Designer.cs b/MSGer.tk/Forms/SettingsForm.Designer.cs new file mode 100644 index 0000000..d55bf8c --- /dev/null +++ b/MSGer.tk/Forms/SettingsForm.Designer.cs @@ -0,0 +1,155 @@ +namespace MSGer.tk +{ + partial class SettingsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + GlacialComponents.Controls.GLColumn glColumn1 = new GlacialComponents.Controls.GLColumn(); + this.glacialList1 = new GlacialComponents.Controls.GlacialList(); + this.panel1 = new System.Windows.Forms.Panel(); + this.okbtn = new System.Windows.Forms.Button(); + this.cancelbtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // glacialList1 + // + this.glacialList1.AllowColumnResize = true; + this.glacialList1.AllowMultiselect = false; + this.glacialList1.AlternateBackground = System.Drawing.Color.DarkGreen; + this.glacialList1.AlternatingColors = false; + this.glacialList1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.glacialList1.AutoHeight = true; + this.glacialList1.BackColor = System.Drawing.Color.White; + this.glacialList1.BackgroundStretchToFit = true; + glColumn1.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None; + glColumn1.CheckBoxes = false; + glColumn1.ImageIndex = -1; + glColumn1.Name = "Column1"; + glColumn1.NumericSort = false; + glColumn1.Text = "Column"; + glColumn1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + glColumn1.Width = 115; + this.glacialList1.Columns.AddRange(new GlacialComponents.Controls.GLColumn[] { + glColumn1}); + this.glacialList1.ControlStyle = GlacialComponents.Controls.GLControlStyles.Normal; + this.glacialList1.ForeColor = System.Drawing.Color.Black; + this.glacialList1.FullRowSelect = true; + this.glacialList1.GridColor = System.Drawing.Color.LightGray; + this.glacialList1.GridLines = GlacialComponents.Controls.GLGridLines.gridBoth; + this.glacialList1.GridLineStyle = GlacialComponents.Controls.GLGridLineStyles.gridSolid; + this.glacialList1.GridTypes = GlacialComponents.Controls.GLGridTypes.gridOnExists; + this.glacialList1.HeaderHeight = 0; + this.glacialList1.HeaderVisible = false; + this.glacialList1.HeaderWordWrap = false; + this.glacialList1.HotColumnTracking = false; + this.glacialList1.HotItemTracking = true; + this.glacialList1.HotTrackingColor = System.Drawing.Color.LightGray; + this.glacialList1.HoverEvents = false; + this.glacialList1.HoverTime = 1; + this.glacialList1.ImageList = null; + this.glacialList1.ItemHeight = 17; + this.glacialList1.ItemWordWrap = false; + this.glacialList1.Location = new System.Drawing.Point(12, 12); + this.glacialList1.Name = "glacialList1"; + this.glacialList1.Selectable = true; + this.glacialList1.SelectedTextColor = System.Drawing.Color.White; + this.glacialList1.SelectionColor = System.Drawing.Color.DarkBlue; + this.glacialList1.ShowBorder = true; + this.glacialList1.ShowFocusRect = false; + this.glacialList1.Size = new System.Drawing.Size(120, 418); + this.glacialList1.SortType = GlacialComponents.Controls.SortTypes.InsertionSort; + this.glacialList1.SuperFlatHeaderColor = System.Drawing.Color.White; + this.glacialList1.TabIndex = 0; + this.glacialList1.Text = "glacialList1"; + this.glacialList1.Click += new System.EventHandler(this.glacialList1_Click); + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.AutoScroll = true; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Location = new System.Drawing.Point(139, 13); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(385, 391); + this.panel1.TabIndex = 1; + // + // okbtn + // + this.okbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okbtn.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okbtn.Location = new System.Drawing.Point(368, 410); + this.okbtn.Name = "okbtn"; + this.okbtn.Size = new System.Drawing.Size(75, 23); + this.okbtn.TabIndex = 2; + this.okbtn.Text = "OK"; + this.okbtn.UseVisualStyleBackColor = true; + this.okbtn.Click += new System.EventHandler(this.okbtn_Click); + // + // cancelbtn + // + this.cancelbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelbtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelbtn.Location = new System.Drawing.Point(449, 410); + this.cancelbtn.Name = "cancelbtn"; + this.cancelbtn.Size = new System.Drawing.Size(75, 23); + this.cancelbtn.TabIndex = 3; + this.cancelbtn.Text = "Mégse"; + this.cancelbtn.UseVisualStyleBackColor = true; + this.cancelbtn.Click += new System.EventHandler(this.cancelbtn_Click); + // + // SettingsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(536, 442); + this.Controls.Add(this.cancelbtn); + this.Controls.Add(this.okbtn); + this.Controls.Add(this.panel1); + this.Controls.Add(this.glacialList1); + this.Name = "SettingsForm"; + this.Text = "SettingsForm"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SettingsForm_FormClosed); + this.Controls.SetChildIndex(this.glacialList1, 0); + this.Controls.SetChildIndex(this.panel1, 0); + this.Controls.SetChildIndex(this.okbtn, 0); + this.Controls.SetChildIndex(this.cancelbtn, 0); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private GlacialComponents.Controls.GlacialList glacialList1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button okbtn; + private System.Windows.Forms.Button cancelbtn; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsForm.cs b/MSGer.tk/Forms/SettingsForm.cs new file mode 100644 index 0000000..56a7ff3 --- /dev/null +++ b/MSGer.tk/Forms/SettingsForm.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SettingsForm : ThemedForms + { + public static bool ApplyingSettings = false; + public SettingsForm() + { + InitializeComponent(); + this.Text = Language.Translate(Language.StringID.Settings); + + ActivePanel = new SettingsPanelPersonal(); //2015.05.23. + ShownPanels.Add(ActivePanel); //2015.05.23. + glacialList1.Items.Add(Language.Translate(Language.StringID.Settings_Personal)); + glacialList1.Items.Add(Language.Translate(Language.StringID.Settings_Layout)); + glacialList1.Items.Add(Language.Translate(Language.StringID.Settings_Packs)); + glacialList1.Items.Add(Language.Translate(Language.StringID.Settings_Network)); + } + + private List ShownPanels = new List(); + private void glacialList1_Click(object sender, EventArgs e) + { + int tmp = glacialList1.HotItemIndex; + if (tmp > glacialList1.Items.Count) + return; + switch (tmp) + { + case 0: + //Személyes + SetActivePanel(); //2015.05.23. + break; + case 1: + //Kinézet + SetActivePanel(); //2015.05.23. + break; + case 2: + //Csomagok + SetActivePanel(); //2015.05.23. + break; + case 3: + //Hálózat + SetActivePanel(); //2015.05.24. + break; + } + } + + private void SetActivePanel() where T : SettingsPanel + { + T panel = null; //2015.05.23. + panel = ShownPanels.FirstOrDefault(entry => entry.GetType() == typeof(T)) as T; //Single-->FirstOrDefault: 2015.06.06. + if (panel == null) + { //2015.05.23. + ActivePanel = Activator.CreateInstance(); + ShownPanels.Add(ActivePanel); + } + else + ActivePanel = panel; + } + + private SettingsPanel activepanel; + private SettingsPanel ActivePanel + { //2015.05.23. + get + { + return activepanel; + } + set + { + if (activepanel != null) + activepanel.Hide(); + activepanel = value; + panel1.Controls.Add(activepanel); + activepanel.Dock = DockStyle.Fill; + activepanel.Show(); + } + } + private void okbtn_Click(object sender, EventArgs e) + { + ApplyingSettings = true; + bool reopen = false; + foreach (SettingsPanel panel in ShownPanels) //2015.05.23. + if (panel.SaveSettings()) //2015.05.23. + reopen = true; //2015.05.23. + if (reopen) + { + ChatPanel.ReopenChatWindows(true); + Program.MainF.ChangeChatWindowLayout(true); //2015.06.14. + } + ApplyingSettings = false; + this.Close(); + } + + private void cancelbtn_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void SettingsForm_FormClosed(object sender, FormClosedEventArgs e) + { + Program.SettingsF = null; + } + } +} diff --git a/MSGer.tk/Forms/SettingsForm.resx b/MSGer.tk/Forms/SettingsForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SettingsForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsPanels/.justforgithub b/MSGer.tk/Forms/SettingsPanels/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanel.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanel.cs new file mode 100644 index 0000000..c995cba --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public class SettingsPanel : UserControl + { + /// + /// SaveSettings + /// + /// Reopen + public virtual bool SaveSettings() + { + throw new InvalidOperationException("SaveSettings is not overriden."); //2015.05.23. + } + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.Designer.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.Designer.cs new file mode 100644 index 0000000..76d0a5c --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.Designer.cs @@ -0,0 +1,87 @@ +namespace MSGer.tk +{ + partial class SettingsPanelLayout + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.chatwindowTabs = new System.Windows.Forms.CheckBox(); + this.chatwindow = new System.Windows.Forms.CheckBox(); + this.layout = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // chatwindowTabs + // + this.chatwindowTabs.AutoSize = true; + this.chatwindowTabs.Enabled = false; + this.chatwindowTabs.Location = new System.Drawing.Point(51, 69); + this.chatwindowTabs.Name = "chatwindowTabs"; + this.chatwindowTabs.Size = new System.Drawing.Size(194, 17); + this.chatwindowTabs.TabIndex = 12; + this.chatwindowTabs.Text = "A beszélgetések fülekbe rendezése"; + this.chatwindowTabs.UseVisualStyleBackColor = true; + // + // chatwindow + // + this.chatwindow.AutoSize = true; + this.chatwindow.Location = new System.Drawing.Point(13, 45); + this.chatwindow.Name = "chatwindow"; + this.chatwindow.Size = new System.Drawing.Size(272, 17); + this.chatwindow.TabIndex = 11; + this.chatwindow.Text = "A beszélgetések jelenjenek meg külön ablak(ok)ban"; + this.chatwindow.UseVisualStyleBackColor = true; + // + // layout + // + this.layout.AutoSize = true; + this.layout.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.layout.Location = new System.Drawing.Point(7, 10); + this.layout.Name = "layout"; + this.layout.Size = new System.Drawing.Size(105, 31); + this.layout.TabIndex = 10; + this.layout.Text = "Kinézet"; + // + // SettingsPanelLayout + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.chatwindowTabs); + this.Controls.Add(this.chatwindow); + this.Controls.Add(this.layout); + this.Name = "SettingsPanelLayout"; + this.Size = new System.Drawing.Size(346, 122); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.CheckBox chatwindowTabs; + private System.Windows.Forms.CheckBox chatwindow; + private System.Windows.Forms.Label layout; + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.cs new file mode 100644 index 0000000..3d590f1 --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SettingsPanelLayout : SettingsPanel + { //2015.05.23. + public SettingsPanelLayout() + { + InitializeComponent(); + + layout.Text = Language.Translate(Language.StringID.Settings_Layout); + chatwindow.Text = Language.Translate(Language.StringID.Settings_ChatWindow); + chatwindowTabs.Text = Language.Translate(Language.StringID.Settings_ChatWindowTabs); + chatwindow.Checked = (Storage.Settings[SettingType.ChatWindow] == "1"); + } + + /// + /// SaveSettings + /// + /// reopen + public override bool SaveSettings() + { + if (chatwindow.Checked && Storage.Settings[SettingType.ChatWindow] == "0") + { + Storage.Settings[SettingType.ChatWindow] = "1"; + return true; + } + else if (!chatwindow.Checked && Storage.Settings[SettingType.ChatWindow] == "1") + { + Storage.Settings[SettingType.ChatWindow] = "0"; + return true; + } + return false; + } + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.resx b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelLayout.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.Designer.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.Designer.cs new file mode 100644 index 0000000..3a96cf2 --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.Designer.cs @@ -0,0 +1,99 @@ +namespace MSGer.tk +{ + partial class SettingsPanelNetwork + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.network = new System.Windows.Forms.Label(); + this.portLabel = new System.Windows.Forms.Label(); + this.portNum = new System.Windows.Forms.NumericUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.portNum)).BeginInit(); + this.SuspendLayout(); + // + // network + // + this.network.AutoSize = true; + this.network.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.network.Location = new System.Drawing.Point(9, 8); + this.network.Name = "network"; + this.network.Size = new System.Drawing.Size(115, 31); + this.network.TabIndex = 13; + this.network.Text = "Network"; + // + // portLabel + // + this.portLabel.AutoSize = true; + this.portLabel.Location = new System.Drawing.Point(12, 51); + this.portLabel.Name = "portLabel"; + this.portLabel.Size = new System.Drawing.Size(29, 13); + this.portLabel.TabIndex = 14; + this.portLabel.Text = "Port:"; + // + // portNum + // + this.portNum.Location = new System.Drawing.Point(47, 49); + this.portNum.Maximum = new decimal(new int[] { + 20000, + 0, + 0, + 0}); + this.portNum.Minimum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.portNum.Name = "portNum"; + this.portNum.Size = new System.Drawing.Size(77, 20); + this.portNum.TabIndex = 15; + this.portNum.Value = new decimal(new int[] { + 4510, + 0, + 0, + 0}); + // + // SettingsPanelNetwork + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.portNum); + this.Controls.Add(this.portLabel); + this.Controls.Add(this.network); + this.Name = "SettingsPanelNetwork"; + this.Size = new System.Drawing.Size(450, 108); + ((System.ComponentModel.ISupportInitialize)(this.portNum)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label network; + private System.Windows.Forms.Label portLabel; + private System.Windows.Forms.NumericUpDown portNum; + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.cs new file mode 100644 index 0000000..bb477f6 --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SettingsPanelNetwork : SettingsPanel + { //2015.05.24. + public SettingsPanelNetwork() + { + InitializeComponent(); + network.Text = Language.Translate(Language.StringID.Settings_Network); + portNum.Value = CurrentUser.Port; + } + + public override bool SaveSettings() + { + CurrentUser.Port = (int)portNum.Value; + return false; + } + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.resx b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelNetwork.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.Designer.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.Designer.cs new file mode 100644 index 0000000..f890c5f --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.Designer.cs @@ -0,0 +1,86 @@ +namespace MSGer.tk +{ + partial class SettingsPanelPacks + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.Scripterbtn = new System.Windows.Forms.Button(); + this.packs = new System.Windows.Forms.Label(); + this.themedesignerbtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // Scripterbtn + // + this.Scripterbtn.Location = new System.Drawing.Point(12, 41); + this.Scripterbtn.Name = "Scripterbtn"; + this.Scripterbtn.Size = new System.Drawing.Size(83, 23); + this.Scripterbtn.TabIndex = 13; + this.Scripterbtn.Text = "Szkriptíró"; + this.Scripterbtn.UseVisualStyleBackColor = true; + this.Scripterbtn.Click += new System.EventHandler(this.Scripterbtn_Click); + // + // packs + // + this.packs.AutoSize = true; + this.packs.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.packs.Location = new System.Drawing.Point(6, 7); + this.packs.Name = "packs"; + this.packs.Size = new System.Drawing.Size(89, 31); + this.packs.TabIndex = 12; + this.packs.Text = "Packs"; + // + // themedesignerbtn + // + this.themedesignerbtn.Location = new System.Drawing.Point(12, 70); + this.themedesignerbtn.Name = "themedesignerbtn"; + this.themedesignerbtn.Size = new System.Drawing.Size(83, 23); + this.themedesignerbtn.TabIndex = 14; + this.themedesignerbtn.Text = "Tématervező"; + this.themedesignerbtn.UseVisualStyleBackColor = true; + this.themedesignerbtn.Click += new System.EventHandler(this.themedesignerbtn_Click); + // + // SettingsPanelPacks + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.themedesignerbtn); + this.Controls.Add(this.Scripterbtn); + this.Controls.Add(this.packs); + this.Name = "SettingsPanelPacks"; + this.Size = new System.Drawing.Size(189, 138); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button Scripterbtn; + private System.Windows.Forms.Label packs; + private System.Windows.Forms.Button themedesignerbtn; + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.cs new file mode 100644 index 0000000..eae7a1f --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SettingsPanelPacks : SettingsPanel + { + public SettingsPanelPacks() + { + InitializeComponent(); + + packs.Text = Language.Translate(Language.StringID.Settings_Packs); + Scripterbtn.Text = Language.Translate(Language.StringID.Scripter); + } + + public override bool SaveSettings() + { + return false; + } + + private void Scripterbtn_Click(object sender, EventArgs e) + { + new ScripterWindow().Show(); + } + + private void themedesignerbtn_Click(object sender, EventArgs e) + { //2015.05.23. + new ThemeDesigner().Show(); + } + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.resx b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPacks.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.Designer.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.Designer.cs new file mode 100644 index 0000000..e1c8ca4 --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.Designer.cs @@ -0,0 +1,152 @@ +namespace MSGer.tk +{ + partial class SettingsPanelPersonal + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.languageList = new System.Windows.Forms.ListView(); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.languageLabel = new System.Windows.Forms.Label(); + this.messageText = new System.Windows.Forms.TextBox(); + this.messageLabel = new System.Windows.Forms.Label(); + this.nameText = new System.Windows.Forms.TextBox(); + this.nameLabel = new System.Windows.Forms.Label(); + this.personal = new System.Windows.Forms.Label(); + this.selectimgbtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // languageList + // + this.languageList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.languageList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader2}); + this.languageList.LabelWrap = false; + this.languageList.Location = new System.Drawing.Point(12, 191); + this.languageList.MultiSelect = false; + this.languageList.Name = "languageList"; + this.languageList.Size = new System.Drawing.Size(347, 78); + this.languageList.TabIndex = 13; + this.languageList.UseCompatibleStateImageBehavior = false; + // + // languageLabel + // + this.languageLabel.AutoSize = true; + this.languageLabel.Location = new System.Drawing.Point(9, 175); + this.languageLabel.Name = "languageLabel"; + this.languageLabel.Size = new System.Drawing.Size(34, 13); + this.languageLabel.TabIndex = 12; + this.languageLabel.Text = "Nyelv"; + // + // messageText + // + this.messageText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.messageText.Location = new System.Drawing.Point(12, 99); + this.messageText.Name = "messageText"; + this.messageText.Size = new System.Drawing.Size(347, 20); + this.messageText.TabIndex = 11; + // + // messageLabel + // + this.messageLabel.AutoSize = true; + this.messageLabel.Location = new System.Drawing.Point(9, 82); + this.messageLabel.Name = "messageLabel"; + this.messageLabel.Size = new System.Drawing.Size(41, 13); + this.messageLabel.TabIndex = 10; + this.messageLabel.Text = "Üzenet"; + // + // nameText + // + this.nameText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nameText.Location = new System.Drawing.Point(12, 52); + this.nameText.Name = "nameText"; + this.nameText.Size = new System.Drawing.Size(347, 20); + this.nameText.TabIndex = 9; + // + // nameLabel + // + this.nameLabel.AutoSize = true; + this.nameLabel.Location = new System.Drawing.Point(9, 35); + this.nameLabel.Name = "nameLabel"; + this.nameLabel.Size = new System.Drawing.Size(27, 13); + this.nameLabel.TabIndex = 8; + this.nameLabel.Text = "Név"; + // + // personal + // + this.personal.AutoSize = true; + this.personal.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.personal.Location = new System.Drawing.Point(3, 0); + this.personal.Name = "personal"; + this.personal.Size = new System.Drawing.Size(147, 31); + this.personal.TabIndex = 7; + this.personal.Text = "Személyes"; + // + // selectimgbtn + // + this.selectimgbtn.Location = new System.Drawing.Point(12, 135); + this.selectimgbtn.Name = "selectimgbtn"; + this.selectimgbtn.Size = new System.Drawing.Size(138, 23); + this.selectimgbtn.TabIndex = 14; + this.selectimgbtn.Text = "Kép kiválasztása..."; + this.selectimgbtn.UseVisualStyleBackColor = true; + this.selectimgbtn.Click += new System.EventHandler(this.selectimgbtn_Click); + // + // SettingsPanelPersonal + // + this.Controls.Add(this.selectimgbtn); + this.Controls.Add(this.languageList); + this.Controls.Add(this.languageLabel); + this.Controls.Add(this.messageText); + this.Controls.Add(this.messageLabel); + this.Controls.Add(this.nameText); + this.Controls.Add(this.nameLabel); + this.Controls.Add(this.personal); + this.Name = "SettingsPanelPersonal"; + this.Size = new System.Drawing.Size(376, 284); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListView languageList; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.Label languageLabel; + private System.Windows.Forms.TextBox messageText; + private System.Windows.Forms.Label messageLabel; + private System.Windows.Forms.TextBox nameText; + private System.Windows.Forms.Label nameLabel; + private System.Windows.Forms.Label personal; + private System.Windows.Forms.Button selectimgbtn; + + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.cs b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.cs new file mode 100644 index 0000000..e48ccee --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class SettingsPanelPersonal : SettingsPanel + { + public static bool ApplyingSettings = false; + public SettingsPanelPersonal() + { + InitializeComponent(); + languageList.Columns[0].Width = languageList.Width; + this.Text = Language.Translate(Language.StringID.Settings); + personal.Text = Language.Translate(Language.StringID.Settings_Personal); + + nameLabel.Text = Language.Translate(Language.StringID.Name); + messageLabel.Text = Language.Translate(Language.StringID.Message); + languageLabel.Text = Language.Translate(Language.StringID.Language); + nameText.Text = CurrentUser.Name; + messageText.Text = CurrentUser.Message; + + selectimgbtn.Text = Language.Translate(Language.StringID.Menu_Tools_ChangeImage); //2015.06.06. + + foreach (var entry in Language.Languages) + { + languageList.Items.Add(entry.Strings["currentlang"], entry.Strings["currentlang"], 0); //2015.05.16. + if (entry == Language.CurrentLanguage) //2015.05.16. + languageList.Items[languageList.Items.Count - 1].Selected = true; + } + } + + public override bool SaveSettings() + { + CurrentUser.Name = nameText.Text; + CurrentUser.Message = messageText.Text; + var langs = Language.Languages; + Language lang = Language.CurrentLanguage; + if (languageList.SelectedItems.Count != 0) + { + foreach (var lng in langs) + { + if (lng.Strings.ContainsKey("currentlang") && languageList.SelectedItems[0].Text == lng.Strings["currentlang"]) + { + lang = lng; + break; + } + } + if (Language.CurrentLanguage != lang) + { + Language.CurrentLanguage = lang; + Language.ReloadLangs(); + } + } + return false; + } + + private void selectimgbtn_Click(object sender, EventArgs e) + { //2015.06.06. + new SelectShownImage().ShowDialog(); + } + } +} diff --git a/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.resx b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Forms/SettingsPanels/SettingsPanelPersonal.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/Forms/ThemeDesigner.Designer.cs b/MSGer.tk/Forms/ThemeDesigner.Designer.cs new file mode 100644 index 0000000..3bb65f5 --- /dev/null +++ b/MSGer.tk/Forms/ThemeDesigner.Designer.cs @@ -0,0 +1,217 @@ +namespace MSGer.tk +{ + partial class ThemeDesigner + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.okbtn = new System.Windows.Forms.Button(); + this.cancelbtn = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.colorRadiobtn = new System.Windows.Forms.RadioButton(); + this.imageRadiobtn = new System.Windows.Forms.RadioButton(); + this.scriptRadiobtn = new System.Windows.Forms.RadioButton(); + this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.scriptLocation = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.domainUpDown1 = new System.Windows.Forms.DomainUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // okbtn + // + this.okbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okbtn.Location = new System.Drawing.Point(21, 292); + this.okbtn.Name = "okbtn"; + this.okbtn.Size = new System.Drawing.Size(75, 23); + this.okbtn.TabIndex = 1; + this.okbtn.Text = "OK"; + this.okbtn.UseVisualStyleBackColor = true; + this.okbtn.Click += new System.EventHandler(this.okbtn_Click); + // + // cancelbtn + // + this.cancelbtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelbtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelbtn.Location = new System.Drawing.Point(102, 292); + this.cancelbtn.Name = "cancelbtn"; + this.cancelbtn.Size = new System.Drawing.Size(75, 23); + this.cancelbtn.TabIndex = 2; + this.cancelbtn.Text = "Mégse"; + this.cancelbtn.UseVisualStyleBackColor = true; + this.cancelbtn.Click += new System.EventHandler(this.cancelbtn_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(101, 25); + this.label1.TabIndex = 3; + this.label1.Text = "Tervezés"; + // + // colorRadiobtn + // + this.colorRadiobtn.AutoSize = true; + this.colorRadiobtn.Location = new System.Drawing.Point(12, 67); + this.colorRadiobtn.Name = "colorRadiobtn"; + this.colorRadiobtn.Size = new System.Drawing.Size(91, 17); + this.colorRadiobtn.TabIndex = 4; + this.colorRadiobtn.TabStop = true; + this.colorRadiobtn.Text = "colorRadiobtn"; + this.colorRadiobtn.UseVisualStyleBackColor = true; + this.colorRadiobtn.CheckedChanged += new System.EventHandler(this.colorRadiobtn_CheckedChanged); + // + // imageRadiobtn + // + this.imageRadiobtn.AutoSize = true; + this.imageRadiobtn.Location = new System.Drawing.Point(12, 120); + this.imageRadiobtn.Name = "imageRadiobtn"; + this.imageRadiobtn.Size = new System.Drawing.Size(96, 17); + this.imageRadiobtn.TabIndex = 5; + this.imageRadiobtn.TabStop = true; + this.imageRadiobtn.Text = "imageRadiobtn"; + this.imageRadiobtn.UseVisualStyleBackColor = true; + this.imageRadiobtn.CheckedChanged += new System.EventHandler(this.imageRadiobtn_CheckedChanged); + // + // scriptRadiobtn + // + this.scriptRadiobtn.AutoSize = true; + this.scriptRadiobtn.Location = new System.Drawing.Point(12, 222); + this.scriptRadiobtn.Name = "scriptRadiobtn"; + this.scriptRadiobtn.Size = new System.Drawing.Size(93, 17); + this.scriptRadiobtn.TabIndex = 6; + this.scriptRadiobtn.TabStop = true; + this.scriptRadiobtn.Text = "scriptRadiobtn"; + this.scriptRadiobtn.UseVisualStyleBackColor = true; + this.scriptRadiobtn.CheckedChanged += new System.EventHandler(this.scriptRadiobtn_CheckedChanged); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Black; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Location = new System.Drawing.Point(12, 90); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(166, 24); + this.panel1.TabIndex = 7; + this.panel1.Click += new System.EventHandler(this.panel1_Click); + // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(12, 143); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(165, 73); + this.pictureBox1.TabIndex = 8; + this.pictureBox1.TabStop = false; + // + // scriptLocation + // + this.scriptLocation.Location = new System.Drawing.Point(12, 258); + this.scriptLocation.Name = "scriptLocation"; + this.scriptLocation.Size = new System.Drawing.Size(166, 20); + this.scriptLocation.TabIndex = 9; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 242); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(70, 13); + this.label2.TabIndex = 10; + this.label2.Text = "Szkript helye:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(9, 44); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(64, 13); + this.label3.TabIndex = 12; + this.label3.Text = "Téma neve:"; + // + // domainUpDown1 + // + this.domainUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.domainUpDown1.Location = new System.Drawing.Point(90, 41); + this.domainUpDown1.Name = "domainUpDown1"; + this.domainUpDown1.Size = new System.Drawing.Size(87, 20); + this.domainUpDown1.TabIndex = 13; + this.domainUpDown1.Text = "New theme"; + this.domainUpDown1.SelectedItemChanged += new System.EventHandler(this.domainUpDown1_SelectedItemChanged); + this.domainUpDown1.TextChanged += new System.EventHandler(this.domainUpDown1_TextChanged); + // + // ThemeDesigner + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(189, 327); + this.Controls.Add(this.domainUpDown1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.scriptLocation); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.panel1); + this.Controls.Add(this.scriptRadiobtn); + this.Controls.Add(this.imageRadiobtn); + this.Controls.Add(this.colorRadiobtn); + this.Controls.Add(this.label1); + this.Controls.Add(this.cancelbtn); + this.Controls.Add(this.okbtn); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "ThemeDesigner"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "ThemeDesigner"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ThemeDesigner_FormClosing); + this.Load += new System.EventHandler(this.ThemeDesigner_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button okbtn; + private System.Windows.Forms.Button cancelbtn; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.RadioButton colorRadiobtn; + private System.Windows.Forms.RadioButton imageRadiobtn; + private System.Windows.Forms.RadioButton scriptRadiobtn; + private System.Windows.Forms.ColorDialog colorDialog1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.TextBox scriptLocation; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.DomainUpDown domainUpDown1; + } +} \ No newline at end of file diff --git a/MSGer.tk/Forms/ThemeDesigner.cs b/MSGer.tk/Forms/ThemeDesigner.cs new file mode 100644 index 0000000..2273827 --- /dev/null +++ b/MSGer.tk/Forms/ThemeDesigner.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class ThemeDesigner : Form + { //2015.05.23. + private bool Stop = false; //2015.07.03. + public ThemeDesigner() + { + InitializeComponent(); + if (ThemedForms.ThemeDesignerRunning != null) + { //2015.07.03. + ThemedForms.ThemeDesignerRunning.Focus(); + Stop = true; + return; + } + domainUpDown1.Items.Clear(); //2015.07.03. + domainUpDown1.Items.AddRange(Theme.Themes); //2015.07.03. + if (domainUpDown1.Items.Count > 0) + domainUpDown1.SelectedIndex = 0; //2015.07.03. + if (domainUpDown1.SelectedItem != null) //2015.07.03. + SelectedTheme = (Theme)domainUpDown1.SelectedItem; + SelectedType = null; //2015.07.03. - Reset + } + + public Theme SelectedTheme { get; set; } //2015.07.03. + private Type selectedtype; //2015.07.03. + public Type SelectedType + { //2015.07.03. + get + { + return selectedtype; + } + set + { + if (SelectedTheme == null) + { + SelectedTheme = PackManager.Add(domainUpDown1.Text); + } + if (value == null) + { + colorRadiobtn.Enabled = false; + panel1.Enabled = false; + panel1.BackColor = Color.Black; + imageRadiobtn.Enabled = false; + pictureBox1.Enabled = false; + pictureBox1.Image = null; + scriptRadiobtn.Enabled = false; + label2.Enabled = false; + scriptLocation.Enabled = false; + scriptLocation.Text = ""; + } + else + { + if (!SelectedTheme.Controls.ContainsKey(value)) + { + SelectedTheme.Controls.Add(value, new ThemeControl(Color.Black, Color.Black)); //2015.07.05. + } + colorRadiobtn.Enabled = true; //2015.07.05. + imageRadiobtn.Enabled = true; //2015.07.05. + scriptRadiobtn.Enabled = true; //2015.07.05. + SetThemeControl(SelectedTheme.Controls[value].ControlType, value); //2015.07.04. + } + selectedtype = value; + } + } + private void ThemeDesigner_Load(object sender, EventArgs e) + { + if (Stop) //2015.07.03. + this.Close(); + ThemedForms.ThemeDesignerRunning = this; //2015.07.03. + } + + private bool InternalCheck = false; //2015.07.05. + private void SetThemeControl(ThemeControlTypes controltype, Type selectedtype = null) //<-- 2015.07.04. - Áthelyezve ide a SelectedType.set()-ből + { + InternalCheck = true; //2015.07.05. + if (selectedtype == null) + selectedtype = SelectedType; //2015.07.04. + switch (controltype) + { + case ThemeControlTypes.Colors: + colorRadiobtn.Checked = true; //2015.07.05. + panel1.Enabled = true; + panel1.BackColor = SelectedTheme.Controls[selectedtype].Color; //2015.07.05. + pictureBox1.Enabled = false; + pictureBox1.Image = null; + label2.Enabled = false; + scriptLocation.Enabled = false; + scriptLocation.Text = ""; + break; + case ThemeControlTypes.Dynamic: + panel1.Enabled = false; + panel1.BackColor = Color.Black; + pictureBox1.Enabled = false; + pictureBox1.Image = null; + scriptRadiobtn.Checked = true; //2015.07.05. + label2.Enabled = true; + scriptLocation.Enabled = true; + scriptLocation.Text = SelectedTheme.Controls[selectedtype].Script; + break; + case ThemeControlTypes.Image: + panel1.Enabled = false; + panel1.BackColor = Color.Black; + imageRadiobtn.Checked = true; //2015.07.05. + pictureBox1.Enabled = true; + pictureBox1.Image = SelectedTheme.Controls[selectedtype].Image; + label2.Enabled = false; + scriptLocation.Enabled = false; + scriptLocation.Text = ""; + break; + } + InternalCheck = false; //2015.07.05. + } + + private void okbtn_Click(object sender, EventArgs e) + { + //TO!DO + Language.ReloadLangs(); //2015.07.05. - Lényegében csak az ablakokat frissíti + PackManager.Save(SelectedTheme); //2015.07.03. + this.Close(); //2015.05.24. + } + + private void cancelbtn_Click(object sender, EventArgs e) + { + this.Close(); //2015.05.24. + } + + private void ThemeDesigner_FormClosing(object sender, FormClosingEventArgs e) + { + if (ThemedForms.ThemeDesignerRunning == this) + ThemedForms.ThemeDesignerRunning = null; //2015.07.03. + } + + private void panel1_Click(object sender, EventArgs e) + { + colorDialog1.Color = panel1.BackColor; //2015.07.03. + if (colorDialog1.ShowDialog() == DialogResult.OK) //2015.07.05. + panel1.BackColor = colorDialog1.Color; //2015.07.05. + } + + private void domainUpDown1_TextChanged(object sender, EventArgs e) + { //2015.07.03. + if (domainUpDown1.SelectedIndex == -1) + { + SelectedType = null; + SelectedTheme = null; + Theme theme = domainUpDown1.Items.ToArray().Cast().FirstOrDefault(entry => entry.ToString() == domainUpDown1.Text); + if (theme != default(Theme)) + domainUpDown1.SelectedItem = theme; + } + } + + private void domainUpDown1_SelectedItemChanged(object sender, EventArgs e) + { + SelectedTheme = (Theme)domainUpDown1.SelectedItem; //2015.07.03. + } + + private void colorRadiobtn_CheckedChanged(object sender, EventArgs e) + { //2015.07.04. + if (!InternalCheck) //<-- 2015.07.05. + SetThemeControl(ThemeControlTypes.Colors); + } + + private void imageRadiobtn_CheckedChanged(object sender, EventArgs e) + { //2015.07.04. + if (!InternalCheck) //<-- 2015.07.05. + SetThemeControl(ThemeControlTypes.Image); + } + + private void scriptRadiobtn_CheckedChanged(object sender, EventArgs e) + { //2015.07.04. + if (!InternalCheck) //<-- 2015.07.05. + SetThemeControl(ThemeControlTypes.Dynamic); + } + } +} diff --git a/MSGer.tk/Forms/ThemeDesigner.resx b/MSGer.tk/Forms/ThemeDesigner.resx new file mode 100644 index 0000000..a480212 --- /dev/null +++ b/MSGer.tk/Forms/ThemeDesigner.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/MSGer.tk/Language.cs b/MSGer.tk/Language.cs index ca28fd2..d310c1b 100644 --- a/MSGer.tk/Language.cs +++ b/MSGer.tk/Language.cs @@ -8,92 +8,73 @@ using System.Windows.Forms; namespace MSGer.tk { - public class Language + public class Language : IPackable, IEquatable, IPackWithDefaults { //2014.04.19. - - public static Dictionary UsedLangs = new Dictionary(); - public Dictionary Strings = new Dictionary(); private static Dictionary Controls = new Dictionary(); - - private Language(string lang) + private Language() { - UsedLangs.Add(lang, this); } - public Language() //2014.09.06. - { - if (!Directory.Exists("languages")) - Directory.CreateDirectory("languages"); - string[] files = Directory.GetFiles("languages"); - if (files.Length == 0) - { - MessageBox.Show("Error: No languages found."); - return; //Még nem jelentkezett be, ezért ki fog lépni - } - for (int x = 0; x < files.Length; x++) - { - string[] lines = File.ReadAllLines(files[x]); - var dict = lines.Select(l => l.Split('=')).ToDictionary(a => a[0], a => a[1]); - var finaldict = new Dictionary(); - foreach(var item in dict) - { - var spl = item.Key.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - foreach(var key in spl) - { - finaldict.Add(key, item.Value); //Hozzáadja az összes felsorolt keyt külön, ugyanazzal az értékkel - } - } - new Language(new FileInfo(files[x]).Name.Split('.')[0]).Strings = finaldict; //(FileInfo: 2014.09.01.) - Eltárol egy új nyelvet, majd a szövegeket hozzátársítja - } - /*if (Language.FromString(Storage.Settings["lang"]) == null) - { - MessageBox.Show("Error: Could not find language: " + Storage.Settings["lang"]); - return; - }*/ - CurrentUser.Language = Language.FromString(Storage.Settings["lang"]); - if (CurrentUser.Language == null) - { - if (Language.UsedLangs.ContainsKey("en")) - { - MessageBox.Show("Error: The specified language (" + Storage.Settings["lang"] + ") is not found.\nThe program will use english that you can change later."); - Storage.Settings["lang"] = "en"; - } - else - { - MessageBox.Show("Error: The specified language (" + Storage.Settings["lang"] + "), nor enlish are found.\nPlease download translations."); - return; - } - } - } + public static List Languages = new List(); //2015.05.16. + + private string LanguageKey = ""; //2015.04.03. public override string ToString() { - return UsedLangs.FirstOrDefault(x => x.Value == this).Key; + return LanguageKey; } public static Language FromString(string value) { Language tmp = null; - UsedLangs.TryGetValue(value, out tmp); + tmp = Languages.FirstOrDefault(entry => entry.LanguageKey == value); //Single-->FirstOrDefault: 2015.06.06. return tmp; } - public static Language GetCurrentLanguage() //Javítva Cuurent-ről Current-re: 2014.12.13. - Már régóta ki akartam javítani - { - return Language.FromString(Storage.Settings["lang"]); + private static Language currentlanguage; + public static Language CurrentLanguage + { //2015.04.03. + get + { + if (currentlanguage == null) //2015.05.16. + { + if (Storage.Settings[SettingType.Lang] == "") + Storage.Settings[SettingType.Lang] = "en"; //2015.05.21. + currentlanguage = Language.FromString(Storage.Settings[SettingType.Lang]); //2015.05.16. + } + return currentlanguage; //2015.05.16. + } + set + { + Storage.Settings[SettingType.Lang] = value.ToString(); + currentlanguage = value; //2015.05.16. + value.LoadAllStrings(); //2015.05.21. + } } - public static string Translate(string id, Control defaultevent = null) //Csak akkor kell az event, ha látszódik az adott ablak, amikor átállítódik - Tehát csak MainForm és ChatForm + public static string Translate(StringID id, Control defaultevent = null) //Csak akkor kell az event, ha látszódik az adott ablak, amikor átállítódik - Tehát csak MainForm és ChatForm { //2014.08.19. - Language lang = GetCurrentLanguage(); - if (lang.Strings.ContainsKey(id)) + if (CurrentLanguage == null) + { //2015.05.22. + if (Language.Languages.Any(entry => entry.LanguageKey == "en")) + { + MessageBox.Show("Error: The specified language (" + Storage.Settings[SettingType.Lang] + ") is not found.\nThe program will use english that you can change later."); + CurrentLanguage = Languages.FirstOrDefault(entry => entry.LanguageKey == "en"); //Single-->FirstOrDefault: 2015.06.06. + } + else + { + throw new FileNotFoundException("This is just so it will use English when downloading languages..."); + } + } + string strid = id.ToString().ToLower(); + if (CurrentLanguage.Strings.ContainsKey(strid)) { if (defaultevent != null) //2014.12.22. - ReloadEvent += delegate { defaultevent.Text = lang.Strings[id]; }; //2014.12.22. - return lang.Strings[id]; + ReloadEvent += delegate { defaultevent.Text = CurrentLanguage.Strings[strid]; }; //2014.12.22. + return CurrentLanguage.Strings[strid]; } else { - MessageBox.Show("Translation string not found: " + id + "\nIn file: " + lang + ".txt"); - return "Str not found"; + MessageBox.Show("Translation string not found: " + strid + "\nIn file: " + CurrentLanguage.FileName); //CurrentLanguage.FileName: 2015.05.22. + return "Str not found (" + strid + ")"; //id: 2015.04.03. } } public static event EventHandler ReloadEvent; @@ -104,5 +85,242 @@ namespace MSGer.tk Program.MainF.contactList.Items.Clear(); Program.MainF.LoadPartnerList(); } + #region StringID + public enum StringID + { //2015.04.05. + About, + About_Version, + About_Programmer, + About_SpecialThanks, + About_SpecThanks1, + About_SpecThanks2, + About_SpecThanks3, + About_SpecThanks4, + AddContact, + AddContact_NameEmail, + AddContact_Search, + UserName, + Chat_Title, + Sendbtn_Send, + Chat_NoWindow, + Networking_Alone, + Login, + Password, + Registration, + ForgotPassword, + Login_Desc1, + Login_Desc2, + Button_Cancel, + ConnectError, + Reg_Code, + Reg_EmptyField, + Reg_CodeErr, + Reg_NameErr, + Reg_NameLen, + Reg_PassLen, + Reg_Email, + Reg_Success, + Menu_Contacts_MakeCategory, + Menu_Contacts_EditCategory, + Menu_Contacts_RemoveCategory, + Menu_Operations, + Sendmsg, + Menu_Operations_SendOther, + Menu_Operations_SendMail, + Menu_File_SendFile, + Menu_Operations_CallContact, + Menu_Operations_VideoCall, + Menu_Operations_ShowOnlineFiles, + Menu_Operations_PlayGame, + Menu_Operations_AskForHelp, + Menu_Tools, + Menu_Tools_AlwaysOnTop, + Menu_Tools_ChangeImage, + Menu_Tools_ChangeBackground, + Menu_Tools_VoiceVideoSettings, + Menu_Tools_Settings, + Menu_Help, + Menu_Help_Contents, + Menu_Help_Status, + Menu_Help_PrivacyPolicy, + Menu_Help_TermsOfUse, + Menu_Help_Report, + Menu_Help_ImproveProgram, + Menu_Help_About, + SearchBar, + IconMenu_Show, + Menu_File_Logout, + Menu_File_Exit, + BeforeLogin_CheckForUpdates, + OutOfDate, + OutOfDate_Caption, + Updater, + Error, + BeforeLogin_LoginForm, + Close, + Contact_SendEmail, + Contact_Info, + Contact_Block, + Contact_Remove, + Contact_EditName, + Contact_EventNotifications, + Contact_OpenChatLog, + Stats_MainServer, + Stats_NoNetwork, + Stats_Retrying, + Stats_Connected, + Stats_Servers, + Stats_OnlineServers, + BeforeLogin_TranslateMainF, + Menu_File, + Menu_File_LoginNewUser, + Menu_File_Status, + Menu_File_Status_Online, + Menu_File_Status_Busy, + Menu_File_Status_Away, + Menu_File_Status_Hidden, + Menu_File_OpenReceivedFiles, + Menu_File_OpenRecentmsgs, + Menu_File_Close, + Menu_Contacts, + Menu_Contacts_Add, + Menu_Contacts_Edit, + Menu_Contacts_Remove, + Menu_Contacts_Invite, + Menu_Contacts_MakeGroup, + Error_No_Network, + UserID, + Settings, + Settings_Personal, + Settings_Layout, + Name, + Message, + Language, + Settings_ChatWindow, + Settings_ChatWindowTabs, + Offline, + Contact_CopyEmail, + Login_BadNamePass, + Said, + CurrentLang, + ScriptNotFound, + ScriptError, + ScriptUnloadRequired, + Scripter, + Scripter_New, + Scripter_Open, + Scripter_Save, + Scripter_Exit, + Error_Network_NoInternet, + ReceivedFiles, + Settings_Packs, + Settings_Network, + Error_Unknown1, + Error_Unknown2, + Error_ServerError, + FatalError, + RestartButton, + SelectImage, + Modify, + Emoticons, + Add, + Remove, + Text, + AreYouSure, + Handwriting, + FileReceived + } //TODO: Egyszerűsíteni az azonosítókat, nagyjából jelentsék azt, amit, és semmi több (pl. ne Menu_File_...) + #endregion + + private string FileName; + public bool LoadFromPack(string filename) //2015.05.16. + { + FileName = filename; //2015.05.21. + LanguageKey = Path.GetFileNameWithoutExtension(filename); + if (this != CurrentLanguage) //<-- Ellenőrzés: 2015.05.21. + { + foreach (string line in File.ReadLines(filename)) + { + string[] strs = line.Split('='); + if (strs.Length != 2) + continue; + if (strs[0] == "currentlang") + { + Strings.Add(strs[0], strs[1]); + break; + } + } + } + Languages.Add(this); + + if (this == CurrentLanguage) + { + LoadAllStrings(); //2015.05.21. + } + return true; //2015.05.24. + } + + private void LoadAllStrings() //Külön metódus: 2015.05.21. + { + string filename = FileName; + string[] stringids = Enum.GetNames(typeof(StringID)).Select(entry => entry.ToLower()).ToArray(); + bool[] stringidsused = new bool[stringids.Length]; + string[] lines = File.ReadAllLines(filename); + var split = lines.Select(l => l.Split('=')); //2015.06.06. + List duplicates = split.GroupBy(x => x[0]) //2015.06.06. + .Where(g => g.Count() > 1) //2015.06.06. + .Select(g => g.Key) //2015.06.06. + .ToList(); //2015.06.06. + if (duplicates.Count > 0) + { //2015.06.06. + MessageBox.Show("Duplicate found (in a different line) in \"" + filename + "\":\n" + duplicates.Aggregate((entry1, entry2) => entry1 += ", " + entry2)); + return; + } + var dict = split.ToDictionary(a => a[0], a => a[1]); + var finaldict = new Dictionary(); + foreach (var item in dict) + { + var spl = item.Key.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + duplicates = spl.GroupBy(x => x) //2015.06.06. + .Where(g => g.Count() > 1) //2015.06.06. + .Select(g => g.Key) //2015.06.06. + .ToList(); //2015.06.06. + if (duplicates.Count > 0) + { //2015.06.06. + MessageBox.Show("Duplicate found (in the same line) in \"" + filename + "\":\n" + duplicates.Aggregate((entry1, entry2) => entry1 += ", " + entry2)); + return; + } + foreach (var key in spl) + { + finaldict.Add(key, item.Value); //Hozzáadja az összes felsorolt keyt külön, ugyanazzal az értékkel + int pos = Array.IndexOf(stringids, key); + if (pos == -1) + { + MessageBox.Show("Warning: The translation ID \"" + key + "\" in " + filename + " is not in use. Please remove it or correct the ID."); + } + else + stringidsused[pos] = true; + } + } + for (int i = 0; i < stringids.Length; i++) + { + if (!stringidsused[i]) + { + MessageBox.Show("Warning: The translation for ID \"" + stringids[i] + "\" in " + filename + " is missing. Please add it to the file."); + } + } + this.LanguageKey = Path.GetFileNameWithoutExtension(filename); + this.Strings = finaldict; + } + + public void UnloadFromPack() //2015.05.16. + { + + } + + public bool Equals(Language other) + { //2015.05.16. + return this.LanguageKey == other.LanguageKey; + } } } diff --git a/MSGer.tk/Logging.cs b/MSGer.tk/Logging.cs index 982b180..6643c92 100644 --- a/MSGer.tk/Logging.cs +++ b/MSGer.tk/Logging.cs @@ -30,14 +30,14 @@ namespace MSGer.tk } string finaltext = "[" + Process.GetCurrentProcess().Id + ": " + Thread.CurrentThread.Name + " | " + DateTime.Now.ToString("yyyy.MM.dd. HH:mm:ss") + "] " + message + Environment.NewLine; Console.WriteLine(logtype.ToString() + " - " + finaltext); - while(true) + while (true) { bool retry = false; try { File.AppendAllText("logs\\" + path + ".txt", finaltext); } - catch(IOException) + catch (IOException) { retry = true; } diff --git a/MSGer.tk/MSGer.tk.csproj b/MSGer.tk/MSGer.tk.csproj index 96fdef3..b663c50 100644 --- a/MSGer.tk/MSGer.tk.csproj +++ b/MSGer.tk/MSGer.tk.csproj @@ -51,6 +51,9 @@ true + + packages\FCTB.2.16.11.0\lib\FastColoredTextBox.dll + D:\Downloads\GlacialListSource13\ListView\bin\Debug\GlacialList.dll @@ -71,102 +74,174 @@ - + Form - + + Emoticons.cs + + + Form + + + ErrorHandler.cs + + + Form + + AboutBox1.cs - + Form - + AddPartner.cs - + Form - + BeforeLogin.cs - + Form - + ChatForm.cs - + UserControl - + ChatPanel.cs - - - + + Form - + InvitePartner.cs + + Form + + + FloatingChatIcon.cs + + + Form + + + SelectShownImage.cs + + + UserControl + + + UserControl + + + SettingsPanelLayout.cs + + + UserControl + + + SettingsPanelNetwork.cs + + + UserControl + + + SettingsPanelPacks.cs + + + UserControl + + + SettingsPanelPersonal.cs + + + + Form + + + ThemeDesigner.cs + + + + - + Form - + LoginForm.RegistrationForm.cs - + Form - + MainForm.cs - + Form - + LoginForm.cs - + Form - - - - + + + + + Form - + Notifier.cs - + + + Form - + PartnerInformation.cs + - + Form - + + ScripterWindow.cs + + + + Form + + SettingsForm.cs - - + + + + Form - + ThemedForms.cs - - + @@ -174,65 +249,97 @@ True Resources.resx - + Form - + SelectPartnerForm.cs - + AboutBox1.cs - + AddPartner.cs - + BeforeLogin.cs - + ChatForm.cs - + ChatPanel.cs - + + Emoticons.cs + + + ErrorHandler.cs + + InvitePartner.cs - + LoginForm.RegistrationForm.cs - + MainForm.cs - + LoginForm.cs - + Notifier.cs - + PartnerInformation.cs + + FloatingChatIcon.cs + + + SelectShownImage.cs + + + SettingsPanelLayout.cs + + + SettingsPanelNetwork.cs + + + SettingsPanelPacks.cs + + + SettingsPanelPersonal.cs + + + ThemeDesigner.cs + ResXFileCodeGenerator Resources.Designer.cs Designer - + + ScripterWindow.cs + + SelectPartnerForm.cs - + SettingsForm.cs - + ThemedForms.cs - + Form - - + + + + SettingsSingleFileGenerator Settings.Designer.cs @@ -308,6 +415,9 @@ True + + + 10 mp + { //2014.08.19. - Ret.Count == tmp.Length + if (MainForm.LThread != null) //2014.09.06. + { + while (DataBuffer == null && Environment.TickCount - 1000 * count * 2 < lasttick) ; //Várakozik, amíg a másik thread át nem adja a választ - 2014.10.09. - 10 mp --> 2 mp + } + if (DataBuffer == null) //2014.08.30. - Az idő telt le + { + Console.WriteLine("Didn't get a response in time. Retrying..."); + foreach (var item in UserInfo.IPs.Except(UserInfo.BannedIPs).Except(ResponsedIPs)) //2014.09.22. + { //Elküldi az összes ismert címre + try + { + SenderConnection.Send(senddata, senddata.Length, item); + } + catch (ObjectDisposedException) + { + return null; + } + } + count++; + continue; + } + if (!(!UserInfo.IPs.Any(entry => entry.Address.Equals(RemoteEP.Address)) + && ut != Networking.UpdateType.LoginUser)) + { + foreach (var item in UserInfo.IPs.Where(entry => entry == RemoteEP)) + ResponsedIPs.Add(item); + Debug.WriteLine("Received response. (" + packet.PacketType + ")"); + //var pparts = ParsePacket(DataBuffer); + var rpacket = PacketFormat.FromBytes(DataBuffer); + //if (pparts.KeyVersion != CurrentUser.KeyIndex && pparts.UpdateType != UpdateType.SetKey) + if (rpacket.KeyIndex != CurrentUser.KeyIndex && rpacket.PacketType != UpdateType.SetKey) + { + DataBuffer = null; //2014.09.22. - Mindig adja meg a lehetőséget, hogy újra beállítsa + continue; + } + + int i; + for (i = 0; i < Ret.Count; i++) + { + if (DataBuffer.SequenceEqual(Ret[i])) + break; + } + if (i == Ret.Count) + Ret.Add(DataBuffer); + } //(2014.08.17. -->) Várja meg, amíg az összes online(!) ismerőse válaszol - Vagy letelik az egy perc + DataBuffer = null; //2014.09.22. - Mindig adja meg a lehetőséget, hogy újra beállítsa + } + DataBuffer = null; + RemoteEP = null; + WaitingOnResponse = false; + WaitingOnPacket = 0x00; + return Ret.Select(entry => PacketFormat.FromBytes(entry)).ToArray(); + } + return null; + } + }*/ + } +} diff --git a/MSGer.tk/Networking/Networking.Threads.cs b/MSGer.tk/Networking/Networking.Threads.cs new file mode 100644 index 0000000..5874b9c --- /dev/null +++ b/MSGer.tk/Networking/Networking.Threads.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + partial class Networking + { + + public static void KeepUpThread() //TODO: KeepUpThread + { //2014.08.28. + while (true) //while: 2014.12.19. + { + Thread.Sleep(59 * 60 * 1000); //59 percenként frissíti a jelenlétét, így biztosan nem jelenti offline-nak a PHP (elvileg) + Console.WriteLine("KeepUpThread: " + Networking.SendRequest(Networking.RequestType.KeepActive, "", 0, true)); + } + } + } +} diff --git a/MSGer.tk/Networking/Networking.UpdateListAndChat.cs b/MSGer.tk/Networking/Networking.UpdateListAndChat.cs new file mode 100644 index 0000000..72e5c50 --- /dev/null +++ b/MSGer.tk/Networking/Networking.UpdateListAndChat.cs @@ -0,0 +1,167 @@ +using System; +using System.Collections.Generic; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + partial class Networking + { + public class UpdateListAndChat + { + public void Run() + { + while (MainForm.PartnerListUpdateThread != null && Program.MainThread.IsAlive) + { + do + { + PacketFormat pf; + IPEndPoint remoteEP; + if (!Networking.ReceiveUpdates(out pf, out remoteEP)) + break; + IPEndPoint SendBackEP = new IPEndPoint(remoteEP.Address, pf.Port); //2015.05.10. + bool Break = false; + switch (pf.PacketType) + { + case UpdateType.ListUpdate: + { + Networking.ParseUpdateInfo(new string[1][] { ((PDListUpdate)pf.EData).Strings }); + new PacketSender(new PDListUpdate(true), pf.ID).Send(SendBackEP); + break; + } + case UpdateType.LoginUser: + { + PDLoginUser data = (PDLoginUser)pf.EData; + string tmpresp = Networking.SendRequest(Networking.RequestType.CheckUser, pf.EUserID.ToString(), 0, true); //2014.09.19. + if (tmpresp == "Fail") + { + Break = true; + break; //Nem küld el neki semmit, hanem újra várja a packet-eket + } + else if (tmpresp != "Success") + { + MessageBox.Show("LoginUser:\n" + tmpresp); + Break = true; + break; + } + + if (!UserInfo.IPs.Any(entry => entry == SendBackEP)) + UserInfo.IPs.Add(SendBackEP); + List strs = new List(); + foreach (var uinfo in data.UserInfos) + { + int uid = uinfo.Key; + int updatetime = uinfo.Value; + UserInfo user = UserInfo.Select(uid); + if (user == null) + continue; + strs.Add(user.ToString()); //Egybe rakja felhasználónként, de amikor megkapja, ugyanúgy szétválogatja majd + } + new PacketSender(new PDLoginUser(strs.ToArray()), pf.ID).Send(SendBackEP); + break; + } + case UpdateType.LogoutUser: + { //2015.05.10. - Felesleges elküldenie az IP-címeket, mint a bejelentkezésnél + UserInfo.Select(pf.EUserID).State = 0; + new PacketSender(new PDLogoutUser(), pf.ID).Send(SendBackEP); + break; + } + case UpdateType.GetImage: + { + PDGetImage data = (PDGetImage)pf.EData; + UserInfo user = UserInfo.Select(data.UserID); + bool success; + byte[] imagedata; + if (user.PicUpdateTime > data.PicUpdateTime) + { + success = true; + var ms = new MemoryStream(); + if (user.Image != null) + { + user.Image.Save(ms, ImageFormat.Tiff); //2015.05.30. + imagedata = ms.ToArray(); //2015.05.30. + } + else + { + success = false; + imagedata = new byte[0]; + } + } + else + { + success = false; + imagedata = new byte[0]; + } + new PacketSender(new PDGetImage(success, user.PicUpdateTime, imagedata), pf.ID).Send(SendBackEP); + } + break; + case UpdateType.UpdateMessages: + { + PDUpdateMessages data = (PDUpdateMessages)pf.EData; + bool success = true; + var userinfos = data.Users.Select(entry => UserInfo.Select(entry)); //2015.06.16. + if (userinfos.Except(UserInfo.KnownUsers.Where(entry => entry.IsPartner && entry.UserID != CurrentUser.UserID)).Count() == 0) + { //2015.06.16. - Leellenőrzi, hogy van-e ismerőse a listában + success = false; //2015.06.25. + } + else + { + ChatPanel cp = ChatPanel.GetChatPanelByUsers(userinfos); + if (cp == null) //2015.05.16. + cp = ChatPanel.Create(data.Users.Select(entry => UserInfo.Select(entry))); //2015.05.16. + cp.ShowReceivedMessageT(UserInfo.Select(pf.EUserID), data.Message, data.Time); + } + new PacketSender(new PDUpdateMessages(success), pf.ID).Send(SendBackEP); + } + break; + case UpdateType.SetKey: + break; //TODO + case UpdateType.SendImage: //2015.06.25. + { + PDSendImage data = (PDSendImage)pf.EData; + bool success = true; + var userinfos = data.Users.Select(entry => UserInfo.Select(entry)); + if (userinfos.Except(UserInfo.KnownUsers.Where(entry => entry.IsPartner && entry.UserID != CurrentUser.UserID)).Count() == 0) + { + success = false; + } + ChatPanel cp = ChatPanel.GetChatPanelByUsers(userinfos); + if (cp == null) + cp = ChatPanel.Create(data.Users.Select(entry => UserInfo.Select(entry))); + cp.ShowReceivedImageT(UserInfo.Select(pf.EUserID), data.Image, data.Time); + new PacketSender(new PDSendImage(success), pf.ID).Send(SendBackEP); + } + break; + case UpdateType.SendFile: //2015.06.30. + { + PDSendFile data = (PDSendFile)pf.EData; + bool success = true; + var userinfos = data.Users.Select(entry => UserInfo.Select(entry)); + if (userinfos.Except(UserInfo.KnownUsers.Where(entry => entry.IsPartner && entry.UserID != CurrentUser.UserID)).Count() == 0) + { + success = false; + } + ChatPanel cp = ChatPanel.GetChatPanelByUsers(userinfos); + if (cp == null) + cp = ChatPanel.Create(data.Users.Select(entry => UserInfo.Select(entry))); + long rprogress = cp.ShowReceivedFileT(UserInfo.Select(pf.EUserID), data.File, data.Time, data.Progress); + new PacketSender(new PDSendFile(success, rprogress, CurrentUser.IPs, CurrentUser.Port), pf.ID).Send(SendBackEP); + } + break; + default: //2015.06.25. + throw new NotImplementedException("This type (" + pf.PacketType + ") is not handled in code."); //2015.06.25. + } + if (Break) + break; + } while (false); + } + } + } + } +} diff --git a/MSGer.tk/Networking/Networking.cs b/MSGer.tk/Networking/Networking.cs new file mode 100644 index 0000000..64ed0f7 --- /dev/null +++ b/MSGer.tk/Networking/Networking.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + static partial class Networking + { + public static UdpClient SenderConnection = new UdpClient(AddressFamily.InterNetworkV6); + public static UdpClient ReceiverConnection; + public static Dictionary Senders = new Dictionary(); + + public enum UpdateType : byte + { + ListUpdate = 0x01, //0x01: OK + UpdateMessages, //0x01: OK + GetImage, //(int)0: Hiba, egyébként a kép hossza, majd a kép + LoginUser, //0x00: Hiba - Egyébként minden fontos információ, amiről "lemaradt" + LogoutUser, //0x01: OK + SetKey, //0x01: OK + SendImage, + SendFile, + }; + + private static void Log(string message) //2014.12.31. + { + Logging.Log(message, Logging.LogType.Network); + } + + public static async Task SendChatMessage(ChatPanel chat, string message, double time) + { //2014.09.22. + var tmp1 = chat.ChatPartners.Select(entry => entry.UserID).ToArray(); + int[] tmp2 = new int[tmp1.Length + 1]; + tmp1.CopyTo(tmp2, 0); + tmp2[tmp2.Length - 1] = CurrentUser.UserID; + var resp = await new PacketSender(new PDUpdateMessages(tmp2, message, time)).SendAsync(); //2015.05.15. + if (resp == null || resp.Length == 0 || resp.All(entry => !((PDUpdateMessages)entry.EData).RSuccess)) + return false; + else //Ha válaszoltak, és senki sem válaszolt nem oké jelzéssel, akkor rendben van + return true; + } + public static bool ReceiveUpdates(out PacketFormat packet, out IPEndPoint remoteep) + { + //buffer = null; //2015.03.28. + packet = null; + remoteep = null; //2015.03.28. + + IPEndPoint remoteEP; + remoteEP = new IPEndPoint(IPAddress.Any, CurrentUser.Port); //2015.05.24. + byte[] buf; + try + { + buf = ReceiverConnection.Receive(ref remoteEP); + } + catch + { + return false; //2015.03.28. + } + PacketFormat pf = PacketFormat.FromBytes(buf); + if (pf.Response) + { + if (Senders.ContainsKey(pf.ID)) + Senders[pf.ID].OnReceiveResponse(pf, remoteEP); + return false; + } + else + { + packet = pf; + remoteep = remoteEP; + return true; + } + } + } +} diff --git a/MSGer.tk/Packer/.justforgithub b/MSGer.tk/Packer/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Packer/IPackable.cs b/MSGer.tk/Packer/IPackable.cs new file mode 100644 index 0000000..a389790 --- /dev/null +++ b/MSGer.tk/Packer/IPackable.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + public interface IPackable + { + bool LoadFromPack(string filename); + void UnloadFromPack(); + } + public interface IPackWithSave + { + void AddPack(string filename); + void SavePack(string filename); + string FileName { get; set; } + } + public interface IPackWithDefaults + { //2015.06.14. + } +} diff --git a/MSGer.tk/Packer/PackManager.cs b/MSGer.tk/Packer/PackManager.cs new file mode 100644 index 0000000..a3e374a --- /dev/null +++ b/MSGer.tk/Packer/PackManager.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + public static class PackManager + { + private static List PackableThings = new List(); //2015.04.11. + public static void LoadAll() + { //2015.04.11. + var types = Assembly.GetExecutingAssembly().GetTypes(); + foreach (var type in types) + { + if (!typeof(IPackable).IsAssignableFrom(type) || type.IsInterface) + continue; + if (!Directory.Exists(GetName(type))) + //continue; + Directory.CreateDirectory(GetName(type)); //2015.05.16. + string[] files = Directory.GetFiles(GetName(type)); + if (files.Length == 0) + DownloadDefaults(type); //2015.06.14. + foreach (string file in files) + { + IPackable packable = Activator.CreateInstance(type, true) as IPackable; + PackableThings.Add(packable); + if (typeof(IPackWithSave).IsAssignableFrom(type) && !type.IsInterface) + (packable as IPackWithSave).FileName = file; //2015.06.06. + if (!packable.LoadFromPack(file)) + PackableThings.Remove(packable); //2015.05.24. - Ezzel elvileg előbb-utóbb törli + } + } + } + + private static void DownloadDefaults(Type type) + { //2015.06.14. +#if not_for_now + if (typeof(IPackWithDefaults).IsAssignableFrom(type) && !type.IsInterface) + { + IPackable packable = Activator.CreateInstance(type, true) as IPackable; + WebClient client = new WebClient(); + client.DownloadFile(Networking.WebAddress + "/" + GetName(type) + ".npack", GetName(type) + "\\default.npack"); + string line; + using (var sr = File.OpenText(GetName(type) + "\\default.npack")) + { + line = sr.ReadLine(); + } + if (line.StartsWith("")) + { + File.Delete(GetName(type) + "\\default.npack"); + throw new WebException("Network error while downloading default pack for " + GetName(type) + ".\n" + line); + } + PackableThings.Add(packable); + } + */ +#endif + //TODO: Az összes IPackable-t *.npack-ként mentse, az elején egy azonosítóval (GetName) + } + public static void UnloadAll() + { //2015.04.11. + foreach (var packable in PackableThings) + { + packable.UnloadFromPack(); + } + PackableThings.Clear(); + } + private static string GetName(Type type) + { //2015.05.16. + return type.Name.ToLower(); + } + public static T Add(string name) where T : class, IPackable, IPackWithSave + { //2015.06.06. + var type = typeof(T); + T packable = Activator.CreateInstance(type, true) as T; + PackableThings.Add(packable); + packable.AddPack(GetName(type) + Path.DirectorySeparatorChar + name); + return packable; + } + public static void Save(T packable) where T : class, IPackable, IPackWithSave + { + packable.SavePack(packable.FileName); + } + + internal static void Remove(T packable) where T : class, IPackable, IPackWithSave + { //2015.06.14. + File.Delete(packable.FileName); //2015.06.14. + } + } +} diff --git a/MSGer.tk/Program.cs b/MSGer.tk/Program.cs index 4aba586..f78f4f2 100644 --- a/MSGer.tk/Program.cs +++ b/MSGer.tk/Program.cs @@ -4,11 +4,15 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; +using System.Drawing; +using System.Drawing.Imaging; using System.Globalization; using System.IO; using System.Linq; using System.Net; +using System.Net.NetworkInformation; using System.Net.Sockets; +using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Text; using System.Threading; @@ -39,24 +43,14 @@ namespace MSGer.tk Console.WriteLine("Starting MSGer.tk..."); AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; - try - { - //MainF = new MainForm(); - 2014.11.21. - A létrehozáskor hozzárendeli, így már akkor hozzáférhető ezen a néven - //Application.Run(MainF); - Application.Run(new MainForm()); //2014.11.21. - } - catch (FileNotFoundException e) - { - MessageBox.Show("Egy fájl nem található.\nA fájl neve:\n" + e.FileName + "\nEnnél a műveletnél: " + e.TargetSite); - - } + Load(); //2015.05.23. + Application.Run(MainF); //2015.05.23. } public static readonly bool ShowFirstChangeExceptions = false; static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { - if (MessageBox.Show("An unhandled error occured\n" + ((Exception)e.ExceptionObject).Message + "\nHere: " + ((Exception)e.ExceptionObject).TargetSite + ((e.IsTerminating) ? "\nThe program will exit(?)." : "") + "\n\nExit?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) - Program.Exit(CurrentUser.UserID != 0); //2014.09.26. - Ha be van jelentkezve, elmenti a beállításokat - Csak mert így tán a legegyszerűbb + new ErrorHandler(ErrorType.Unknown, e.ExceptionObject as Exception); //2015.05.04. } static void CurrentDomain_FirstChanceException(object sender, System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs e) @@ -68,21 +62,21 @@ namespace MSGer.tk private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - public static DateTime UnixTimeToDateTime(string text) + public static DateTime UnixTimeToDateTime(double seconds) { - double seconds = double.Parse(text, CultureInfo.InvariantCulture); //2014.04.25. DateTime time = Epoch.AddSeconds(seconds); time = DateTime.SpecifyKind(time, DateTimeKind.Utc); return time.ToLocalTime(); } - public static string DateTimeToUnixTime(DateTime time) //2014.08.28. + public static double DateTimeToUnixTime(DateTime time) { - return ((time.Ticks - 621355968000000000) / 10000000).ToString(); + time = time.ToUniversalTime(); //2015.07.04. + return ((time.Ticks - 621355968000000000) / 10000000); } - private static void BeforeExit(bool savesettings) + private static void BeforeExit() { //2014.09.01. if (MainF != null) { @@ -95,41 +89,118 @@ namespace MSGer.tk CurrentUser.SendChanges = false; //2014.08.30. MainF.SetOnlineState(null, null); //2014.04.12.) if (MainF.WindowState == FormWindowState.Maximized) //2014.04.18. - 2014.08.08. - Storage.Settings["windowstate"] = "1"; + Storage.Settings[SettingType.WindowState] = "1"; else if (MainF.WindowState == FormWindowState.Minimized) - Storage.Settings["windowstate"] = "2"; + Storage.Settings[SettingType.WindowState] = "2"; else if (MainF.WindowState == FormWindowState.Normal) - Storage.Settings["windowstate"] = "3"; + Storage.Settings[SettingType.WindowState] = "3"; Storage.Save(true); //2014.08.07. } } - if (savesettings) //2014.08.28. - Storage.Save(false); //2014.08.08. + if (Storage.IsLoaded) + Storage.Save(false); if (Networking.ReceiverConnection != null) Networking.ReceiverConnection.Close(); if (Networking.SenderConnection != null) Networking.SenderConnection.Close(); } - public static void Exit(bool savesettings) + public static void Exit() //2015.06.04. { //2014.04.12. - BeforeExit(savesettings); + BeforeExit(); Environment.Exit(0); //Hatásosabb MessageBox.Show("Hiba: Nem sikerült leállítani a programot."); } - public static void Exit() - { //2014.08.28. - Csak akkor ne mentse el a beállításokat, ha nem is töltötte még be őket - Exit(true); - } - public static void Restart(bool savesettings) + public static void Restart() { //2014.09.01. - BeforeExit(savesettings); + BeforeExit(); Process.Start(((ProcessName.Contains("vshost")) ? ProcessName.Replace(".vshost", "") : ProcessName) + ".exe"); Environment.Exit(0); MessageBox.Show("Hiba: Nem sikerült leállítani a programot."); } + public static Thread MainThread = null; + public static void Load() + { + BeforeLogin.SetText("Starting..."); + Thread.CurrentThread.Name = "Main Thread"; + + BeforeLogin.SetText("Loading program settings..."); + Storage.Load(false); //Töltse be a nyelvet, legutóbb használt E-mail-t... + + BeforeLogin.SetText("Checking available ports..."); + SetPort(); + + BeforeLogin.SetText("Loading packs..."); + PackManager.LoadAll(); //2015.05.16. + + MainThread = Thread.CurrentThread; //2015.05.23. + MainF = new MainForm(); //2015.05.23. + + BeforeLogin.SetText(Language.Translate(Language.StringID.BeforeLogin_CheckForUpdates)); + //2014.04.25. + string response = Networking.SendRequest(Networking.RequestType.CheckForUpdates, + Assembly.GetExecutingAssembly().GetName().Version.ToString().Replace(".", ""), + 0, false); + if (response == "outofdate") + { + var res = MessageBox.Show(Language.Translate(Language.StringID.OutOfDate), Language.Translate(Language.StringID.OutOfDate_Caption), MessageBoxButtons.YesNo); + if (res == DialogResult.Yes) + { //2014.12.13. + Process.Start("Updater.exe", "\"" + Language.Translate(Language.StringID.Updater) + "\""); //2015.06.14. + Program.Exit(); + } + } + else if (response != "fine") + new ErrorHandler(ErrorType.ServerError, new Exception(response)); //2015.06.04. + + BeforeLogin.SetText(Language.Translate(Language.StringID.BeforeLogin_LoginForm)); + var LoginDialog = new LoginForm(); //2015.05.23. + BeforeLogin.Destroy(); + LoginDialog.ShowDialog(); + //Nézzük, sikerült-e + if (CurrentUser.UserID == 0) + return; //2014.09.06. + + // Start the thread + MainForm.PartnerListUpdateThread.Start(); //Áthelyezve: 2015.06.30. + + Storage.Load(true); //2014.08.07. + } + + /// + /// Beállítja a portot a Storage.Settings-ben található értéktől kezdve a legelső elérhető portra + /// + public static void SetPort() + { + if (Storage.Settings[SettingType.Port] == "") + Storage.Settings[SettingType.Port] = "4510"; //2015.05.21. + CurrentUser.Port = int.Parse(Storage.Settings[SettingType.Port]); //2015.05.24. + while (true) + { + if (IPGlobalProperties.GetIPGlobalProperties().GetActiveUdpListeners().Select(entry => entry.Port).Contains(CurrentUser.Port)) //2015.05.24. + CurrentUser.Port++; //2015.05.24. + else + break; + } + Networking.ReceiverConnection = new UdpClient(CurrentUser.Port, AddressFamily.InterNetworkV6); //2015.05.24. + Networking.SenderConnection.AllowNatTraversal(true); //2014.09.04. + } + + public static Image LoadImageFromFile(string path) + { //2015.06.06. + //TODO: Ellenőrizni és használni mindenhol, ahol kell - http://stackoverflow.com/questions/12680618/exception-parameter-is-not-valid-on-passing-new-image-to-picturebox + using (Image sourceImg = Image.FromFile(path)) + { + Image clonedImg = new Bitmap(sourceImg.Width, sourceImg.Height, PixelFormat.Format32bppArgb); + using (var copy = Graphics.FromImage(clonedImg)) + { + copy.DrawImage(sourceImg, 0, 0); + } + return clonedImg; + } + } } - static class EnumerableExtensions + static class Extensions { public static bool HasSameElementsAs( this IEnumerable first, @@ -177,13 +248,18 @@ namespace MSGer.tk public static IEnumerable GetAll(this Control control, Type type = null) { //2015.02.26. var controls = control.Controls.Cast(); - - /*return controls.SelectMany(ctrl => GetAll(ctrl, type)) - .Concat(controls) - .Where(c => c.GetType() == type);*/ var ret = controls.SelectMany(ctrl => GetAll(ctrl, type)) .Concat(controls); return (type == null) ? ret : ret.Where(c => c.GetType() == type); } + public static void AppendText(this RichTextBox box, string text, Color color) + { + box.SelectionStart = box.TextLength; + box.SelectionLength = 0; + + box.SelectionColor = color; + box.AppendText(text); + box.SelectionColor = box.ForeColor; + } } } diff --git a/MSGer.tk/Properties/.justforgithub b/MSGer.tk/Properties/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Properties/AssemblyInfo.cs b/MSGer.tk/Properties/AssemblyInfo.cs index 0d583f3..8c6aa49 100644 --- a/MSGer.tk/Properties/AssemblyInfo.cs +++ b/MSGer.tk/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("2.5.0.0")] +[assembly: AssemblyFileVersion("2.5.0.0")] diff --git a/MSGer.tk/Properties/Resources.Designer.cs b/MSGer.tk/Properties/Resources.Designer.cs index fa972d7..5e9641f 100644 --- a/MSGer.tk/Properties/Resources.Designer.cs +++ b/MSGer.tk/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -89,5 +89,15 @@ namespace MSGer.tk.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap noimage { + get { + object obj = ResourceManager.GetObject("noimage", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/MSGer.tk/Properties/Resources.resx b/MSGer.tk/Properties/Resources.resx index 23a4950..ab2f697 100644 --- a/MSGer.tk/Properties/Resources.resx +++ b/MSGer.tk/Properties/Resources.resx @@ -127,4 +127,7 @@ ..\Resources\Menü 2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\noimage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/MSGer.tk/Resources/.justforgithub b/MSGer.tk/Resources/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Resources/noimage.png b/MSGer.tk/Resources/noimage.png new file mode 100644 index 0000000..7519e19 Binary files /dev/null and b/MSGer.tk/Resources/noimage.png differ diff --git a/MSGer.tk/Resources/tmp/.justforgithub b/MSGer.tk/Resources/tmp/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Scripts/.justforgithub b/MSGer.tk/Scripts/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Scripts/IScript.cs b/MSGer.tk/Scripts/IScript.cs new file mode 100644 index 0000000..d6f6332 --- /dev/null +++ b/MSGer.tk/Scripts/IScript.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + public interface IScript + { + void Load(); + void Unload(); + } + + public interface IScriptTheme + { //2015.07.05. + void SkinThis(Type controltype, ThemeControl control, Graphics graphics); + } +} diff --git a/MSGer.tk/Scripts/ScriptInAppDomain.cs b/MSGer.tk/Scripts/ScriptInAppDomain.cs new file mode 100644 index 0000000..304723d --- /dev/null +++ b/MSGer.tk/Scripts/ScriptInAppDomain.cs @@ -0,0 +1,162 @@ +using Microsoft.CSharp; +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + [Serializable] + public class ScriptInAppDomain + { + private AppDomain appdomain; + private string path; + public string Path + { + get + { + path = (appdomain.GetData(DataName) as ScriptInAppDomain).path; + return path; + } + set + { + path = value; + appdomain.SetData(DataName, this); + } + } + private bool success; + public bool Success + { + get + { + success = (appdomain.GetData(DataName) as ScriptInAppDomain).success; + return success; + } + set + { + success = value; + appdomain.SetData(DataName, this); + } + } + [NonSerialized] + private IScript script; + private IScript Script + { + get + { + script = (appdomain.GetData(DataName) as ScriptInAppDomain).script; + return script; + } + set + { + script = value; + appdomain.SetData(DataName, this); + } + } + private CompilerErrorCollection compilererrors; + public CompilerErrorCollection CompilerErrors + { + get + { + compilererrors = (appdomain.GetData(DataName) as ScriptInAppDomain).compilererrors; + return compilererrors; + } + set + { + compilererrors = value; + appdomain.SetData(DataName, this); + } + } + public ScriptInAppDomain(string path, AppDomain domain) + { + appdomain = domain; //Ez remélhetőleg megoldja, hogy mindig a jó AppDomain-ből szerezze az adatokat + Path = path; + } + public void LoadInAppDomain() + { + string code = File.ReadAllText(Path); + CSharpCodeProvider provider = new CSharpCodeProvider(); + CompilerParameters parameters = new CompilerParameters(); + //parameters.ReferencedAssemblies.Add(""); + parameters.GenerateInMemory = true; + parameters.GenerateExecutable = false; + foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + try + { + string location = assembly.Location; + if (!String.IsNullOrEmpty(location)) + { + parameters.ReferencedAssemblies.Add(location); + } + } + catch (NotSupportedException) + { + // this happens for dynamic assemblies, so just ignore it. + } + } + CompilerResults results = provider.CompileAssemblyFromSource(parameters, code); + if (results.Errors.HasErrors) + { + Success = false; //Automatikusan beállítja + return; + } + else //A fordítás sikeres + { + Assembly asm = results.CompiledAssembly; + foreach (var type in asm.GetTypes()) + { + if (type.IsClass && typeof(IScript).IsAssignableFrom(type)) + { + var script = Activator.CreateInstance(type) as IScript; + if (script != null) + { + Script = script; + Script.Load(); //Lefuttatja a szkript Load() függvényét + break; + } + } + } + if (Script == null) + Success = false; + else + Success = true; + return; + } + } + public void UnloadInAppDomain() + { + Script.Unload(); + } + public void JustCompileInAppDomain() + { + string code = File.ReadAllText(Path); + CSharpCodeProvider provider = new CSharpCodeProvider(); + CompilerParameters parameters = new CompilerParameters(); + parameters.GenerateInMemory = true; + parameters.GenerateExecutable = false; + foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + try + { + string location = assembly.Location; + if (!String.IsNullOrEmpty(location)) + { + parameters.ReferencedAssemblies.Add(location); + } + } + catch (NotSupportedException) + { + // this happens for dynamic assemblies, so just ignore it. + } + } + CompilerResults results = provider.CompileAssemblyFromSource(parameters, code); + CompilerErrors = results.Errors; //.Errors: 2015.04.10. + } + public const string DataName = "PluginContextData"; + } +} diff --git a/MSGer.tk/Scripts/ScriptLoader.cs b/MSGer.tk/Scripts/ScriptLoader.cs new file mode 100644 index 0000000..d3f34ad --- /dev/null +++ b/MSGer.tk/Scripts/ScriptLoader.cs @@ -0,0 +1,87 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public class ScriptLoader : IPackable + { + public string Path; + public ScriptLoader(string path) + { + Path = path; + } + private AppDomain PluginAppDomain; + private ScriptInAppDomain script + { + get + { + return PluginAppDomain.GetData(ScriptInAppDomain.DataName) as ScriptInAppDomain; + } + set + { + PluginAppDomain.SetData(ScriptInAppDomain.DataName, value); + } + } + public bool Load() + { + if (!File.Exists(Path)) + return false; + var pluginAppDomainSetup = new AppDomainSetup(); + pluginAppDomainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; + PluginAppDomain = AppDomain.CreateDomain(System.IO.Path.GetFileName(Path), null, pluginAppDomainSetup); + script = new ScriptInAppDomain(Path, PluginAppDomain); + PluginAppDomain.DoCallBack(script.LoadInAppDomain); + if (!script.Success) + AppDomain.Unload(PluginAppDomain); //2015.04.06. + return script.Success; + } + public void Unload() + { + PluginAppDomain.DoCallBack(script.UnloadInAppDomain); + AppDomain.Unload(PluginAppDomain); + PluginAppDomain = null; + } + public CompilerErrorCollection JustCompile() + { + if (!File.Exists(Path) || PluginAppDomain != null) + return null; + var pluginAppDomainSetup = new AppDomainSetup(); + pluginAppDomainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; + PluginAppDomain = AppDomain.CreateDomain(System.IO.Path.GetFileName(Path), null, pluginAppDomainSetup); + script = new ScriptInAppDomain(Path, PluginAppDomain); + PluginAppDomain.DoCallBack(script.JustCompileInAppDomain); + var errors = script.CompilerErrors; //2015.04.10. + AppDomain.Unload(PluginAppDomain); + PluginAppDomain = null; + return errors; + } + + public bool LoadFromPack(string filename) + { + if (!this.Load()) + { + MessageBox.Show(Language.Translate(Language.StringID.ScriptError)); + try + { + this.Unload(); + } + catch + { + } + return false; //2015.05.24. + } + return true; //2015.05.24. + } + + public void UnloadFromPack() + { + this.Unload(); + } + } +} diff --git a/MSGer.tk/Storage.cs b/MSGer.tk/Storage.cs index 764dac1..e77a256 100644 --- a/MSGer.tk/Storage.cs +++ b/MSGer.tk/Storage.cs @@ -12,7 +12,10 @@ namespace MSGer.tk static class Storage { //2014.08.07. public static string FileName; - public static Dictionary Settings = new Dictionary(); + public static Dictionary Settings = new Dictionary(); //2015.05.21. + /// + /// Csak betöltéskor (2015.05.24.) + /// public static Dictionary LoggedInSettings = new Dictionary(); public static readonly string PasswordHash = "PWPassword"; public static string SaltKey; //Bejelentkezéskor kapja meg @@ -28,14 +31,10 @@ namespace MSGer.tk { if (!loggedin) { - Settings.Add("email", ""); - Settings.Add("windowstate", "3"); - Settings.Add("lang", CultureInfo.InstalledUICulture.TwoLetterISOLanguageName); - Settings.Add("port", "4510"); //Use this to connect to different users <-- És fogalmam sincs, miért angolul írtam... - Settings.Add("lastusedemail", "0"); - Settings.Add("filelen", "-1"); //(long) Maximum fájlméret, ameddig bemásolhatja a memóriába - //Settings.Add("isserver", ""); - Settings.Add("chatwindow", "0"); + var settings = typeof(SettingType).GetEnumValues(); + foreach (SettingType setting in settings) + Settings.Add(setting, ""); //TO!DO: Az alapértelmezett értékeket állítsa be + IsLoaded = true; //2015.06.04. } } else @@ -43,11 +42,15 @@ namespace MSGer.tk Parse(Decrypt(Read(loggedin)), loggedin); if (loggedin) UserInfo.Load(); + if (!loggedin) + IsLoaded = true; //2015.06.14. } } public static void Save(bool loggedin) { + if (!IsLoaded && !loggedin) //!loggedin: 2015.06.14. + return; //2015.06.04. if (!loggedin) SaltKey = "nologinnologinnologinnologin"; Write(Encrypt(GetString(loggedin)), loggedin); @@ -70,7 +73,7 @@ namespace MSGer.tk { foreach (var entry in Settings) { - s += entry.Key; + s += (int)entry.Key; //2015.05.21. s += "="; s += entry.Value; s += "\n"; @@ -82,43 +85,42 @@ namespace MSGer.tk private static void Parse(string filecontent, bool loggedin) { string[] splitCache = filecontent.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - var tmp = splitCache.ToDictionary( - entry => entry.Substring(0, entry.IndexOf("=")), - entry => entry.Substring(entry.IndexOf("=") + 1)); if (loggedin) - LoggedInSettings = tmp; + { + LoggedInSettings = splitCache.ToDictionary( + entry => entry.Substring(0, entry.IndexOf("=")), + entry => entry.Substring(entry.IndexOf("=") + 1)); + } else - Settings = tmp; + { + Settings = splitCache.ToDictionary( + entry => (SettingType)int.Parse(entry.Substring(0, entry.IndexOf("="))), //string --> SettingType: 2015.05.21. + entry => entry.Substring(entry.IndexOf("=") + 1)); + } } public static void Parse(string filecontent) //Publikus metódus { string[] splitCache = filecontent.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); var tmp = splitCache.ToDictionary( - entry => "userinfo_" + entry.Substring(0, entry.IndexOf("=")), + //entry => "userinfo_" + entry.Substring(0, entry.IndexOf("=")), - 2015.05.10. + entry => entry.Substring(0, entry.IndexOf("=")), entry => entry.Substring(entry.IndexOf("=") + 1)); LoggedInSettings = LoggedInSettings.Concat(tmp) .ToLookup(pair => pair.Key, pair => pair.Value) .ToDictionary(group => group.Key, group => group.Last()); } - + public static byte[] Encrypt(byte[] content, string code) { - //byte[] plainTextBytes = content; byte[] keyBytes = new Rfc2898DeriveBytes(PasswordHash, Encoding.ASCII.GetBytes(code)).GetBytes(256 / 8); var symmetricKey = new RijndaelManaged() { Mode = CipherMode.CBC, Padding = PaddingMode.None }; var encryptor = symmetricKey.CreateEncryptor(keyBytes, Encoding.ASCII.GetBytes(VIKey)); byte[] plainTextBytes; - //if (content.Length + 4 > keyBytes.Length) - /*plainTextBytes = new byte[content.Length + 4]; - else - plainTextBytes = new byte[content.Length + 4];*/ int targetsize = content.Length + 16 - content.Length % 16; //Hozzáadja a hosszához a hossz 16-tal való osztásának maradékát - Tehát 16-tal osztható lesz plainTextBytes = new byte[targetsize]; - /*Array.Copy(BitConverter.GetBytes(content.Length), plainTextBytes, 4); - Array.Copy(content, 0, plainTextBytes, 4, content.Length);*/ Array.Copy(content, plainTextBytes, content.Length); byte[] cipherTextBytes; @@ -150,9 +152,8 @@ namespace MSGer.tk public static byte[] Decrypt(byte[] b, bool tr, string code) { - //byte[] cipherTextBytes = b; int len = BitConverter.ToInt32(b, 0); - byte[] cipherTextBytes = new byte[len]; + byte[] cipherTextBytes = new byte[b.Length - 4]; //b.Length: 2015.04.03. Array.Copy(b, 4, cipherTextBytes, 0, b.Length - 4); //Itt még az eredeti, feltöltött hosszal számol byte[] keyBytes = new Rfc2898DeriveBytes(PasswordHash, Encoding.ASCII.GetBytes(code)).GetBytes(256 / 8); var symmetricKey = new RijndaelManaged() { Mode = CipherMode.CBC, Padding = PaddingMode.None }; @@ -160,15 +161,9 @@ namespace MSGer.tk var decryptor = symmetricKey.CreateDecryptor(keyBytes, Encoding.ASCII.GetBytes(VIKey)); var memoryStream = new MemoryStream(cipherTextBytes); var cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read); - byte[] plainTextBytes = new byte[cipherTextBytes.Length]; - //List plainTextBytes = new List(); //2014.12.18. + byte[] plainTextBytes = new byte[len]; //2015.04.03. int decryptedByteCount = cryptoStream.Read(plainTextBytes, 0, plainTextBytes.Length); - /*int r=0; //2014.12.18. - while ((r = cryptoStream.ReadByte()) != -1) - { //2014.12.18. - plainTextBytes.Add((byte)r); - }*/ memoryStream.Close(); cryptoStream.Close(); byte[] ret = new byte[len]; @@ -218,5 +213,18 @@ namespace MSGer.tk { LoggedInSettings = new Dictionary(); } + + public static bool IsLoaded { get; private set; } + } + public enum SettingType + { + Email, + WindowState, + Lang, + Port, + LastUsedEmail, + FileLen, + ChatWindow, + Theme } } diff --git a/MSGer.tk/TextBoxHelpers.cs b/MSGer.tk/TextBoxHelpers.cs new file mode 100644 index 0000000..0a4e057 --- /dev/null +++ b/MSGer.tk/TextBoxHelpers.cs @@ -0,0 +1,116 @@ +using FastColoredTextBoxNS; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + public static class TextBoxHelpers + { + /// + /// This class is used as text renderer for smiles + /// + public class GifImageStyle : TextStyle + { + public Dictionary ImagesByText { get; private set; } + public Dictionary SentImagesByText { get; private set; } + FastColoredTextBox parent; + System.Windows.Forms.Timer timer; + + public GifImageStyle(FastColoredTextBox parent) + : base(null, null, FontStyle.Regular) + { + ImagesByText = new Dictionary(); + SentImagesByText = new Dictionary(); //2015.06.26. + this.parent = parent; + + //create timer + timer = new System.Windows.Forms.Timer(); + timer.Interval = 100; + timer.Tick += (EventHandler)delegate + { + ImageAnimator.UpdateFrames(); + parent.Invalidate(); + }; + timer.Start(); + } + + private int counter = 0; + public string AddImage(Image image) + { + string str = "//!img" + counter++; + //ImagesByText.Add(str, image); + SentImagesByText.Add(str, image); //2015.04.07. + return str; + } + + public void StartAnimation() + { + foreach (var image in ImagesByText.Values) + if (ImageAnimator.CanAnimate(image)) + ImageAnimator.Animate(image, new EventHandler(OnFrameChanged)); + } + + void OnFrameChanged(object sender, EventArgs args) + { + } + + public override void Draw(Graphics gr, Point position, Range range) + { + string text = range.Text; + int iChar = range.Start.iChar; + + while (text != "") + { + bool replaced = false; + foreach (var pair in ImagesByText) + { + if (text.StartsWith(pair.Key)) + { + float k = (float)(pair.Key.Length * range.tb.CharWidth) / pair.Value.Width; + if (k > 1) + k = 1f; + // + text = text.Substring(pair.Key.Length); + RectangleF rect = new RectangleF(position.X + range.tb.CharWidth * pair.Key.Length / 2 - pair.Value.Width * k / 2, position.Y, pair.Value.Width * k, pair.Value.Height * k); + gr.DrawImage(pair.Value, rect); + position.Offset(range.tb.CharWidth * pair.Key.Length, 0); + replaced = true; + iChar += pair.Key.Length; + break; + } + } + + //Képküldés + + foreach (var pair in SentImagesByText) + { + if (!pair.Key.StartsWith("//!img")) + throw new InvalidOperationException("An invalid text got set as image placeholder."); //2015.06.26. + if (text.StartsWith(pair.Key)) + { + text = text.Substring(pair.Key.Length); + RectangleF rect = new RectangleF(0, position.Y, pair.Value.Width, pair.Value.Height); + gr.DrawImage(pair.Value, rect); + position.Offset(range.tb.CharWidth * pair.Key.Length, 0); + //position.Offset(-position.X, pair.Value.Height); //2015.07.04. + replaced = true; + iChar += pair.Key.Length; + break; + } + } + if (!replaced && text.Length > 0) + { + Range r = new Range(range.tb, iChar, range.Start.iLine, iChar + 1, range.Start.iLine); + base.Draw(gr, position, r); + position.Offset(range.tb.CharWidth, 0); + text = text.Substring(1); + } + } + } + } + } +} diff --git a/MSGer.tk/TextFormat.cs b/MSGer.tk/TextFormat.cs index 70404f4..33683db 100644 --- a/MSGer.tk/TextFormat.cs +++ b/MSGer.tk/TextFormat.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; +using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -10,67 +11,103 @@ using System.Threading.Tasks; namespace MSGer.tk { - class TextFormat + class TextFormat : IPackable, IPackWithSave { - public TextFormat() + private TextFormat() { - var img = Image.FromFile("emoticons\\iconbase.png"); - var bitmap = new Bitmap(img); - int x = 0; - Bitmap bitmap1 = bitmap.Clone(new Rectangle(x, 0, 19, 19), bitmap.PixelFormat); - x += 19; - new TextFormat(":)", bitmap1); - new TextFormat(":-)", bitmap1); - bitmap1 = bitmap.Clone(new Rectangle(x, 0, 19, 19), bitmap.PixelFormat); - x += 19; - new TextFormat(":D", bitmap1); - new TextFormat(":-D", bitmap1); - new TextFormat(":d", bitmap1); - new TextFormat(":-d", bitmap1); - bitmap1 = bitmap.Clone(new Rectangle(x, 0, 19, 19), bitmap.PixelFormat); - x += 19; - new TextFormat(";)", bitmap1); - new TextFormat(";-)", bitmap1); - bitmap1 = bitmap.Clone(new Rectangle(x, 0, 19, 19), bitmap.PixelFormat); - x += 19; - new TextFormat(":O", bitmap1); - new TextFormat(":o", bitmap1); - new TextFormat(":-O", bitmap1); - new TextFormat(":-o", bitmap1); - bitmap1 = bitmap.Clone(new Rectangle(x, 0, 19, 19), bitmap.PixelFormat); - x += 19; - new TextFormat(":P", bitmap1); - new TextFormat(":-P", bitmap1); - new TextFormat(":p", bitmap1); - new TextFormat(":-p", bitmap1); + } - bitmap.Dispose(); + public static List TextFormats = new List(); //2015.06.06. + private static IEnumerable GetEmoticons() + { //2015.06.06. + return TextFormats.SelectMany(entry => entry.Emoticons); } - private TextFormat(string text, Image image) - { - var tmp = new ImgReplaceStrs(); - tmp.Text = text; - tmp.Image = image; - ImgReplaceStrings.Add(tmp); - } - public static List ImgReplaceStrings = new List(); - public static ExRichTextBox Parse(ExRichTextBox textbox) - { - for (int i = 0; i < ImgReplaceStrings.Count; i++) - { //2014.10.12. - int index=0; - while((index=textbox.Text.IndexOf(ImgReplaceStrings[i].Text))!=-1) - { - textbox.Select(index, ImgReplaceStrings[i].Text.Length); - textbox.InsertImage(ImgReplaceStrings[i].Image); - } + + public List Emoticons = new List(); //2015.06.06. + public bool LoadFromPack(string filename) //2015.05.03. + { //2015.05.24. + if (Path.GetExtension(filename) != ".npack") + return false; //2015.06.06. + var fs = File.Open(filename, FileMode.Open); //2015.06.06. + if (fs.Length <= 10) + { + fs.Dispose(); + return false; //2015.06.06. - TODO: Hasonló ellenőrzéseket a többi packhoz is } - return textbox; + var br = new BinaryReader(fs); //2015.06.06. + int count = br.ReadInt32(); //2015.06.06. + for (int i = 0; i < count; i++) + { + string id = br.ReadString(); //2015.06.06. + int len = br.ReadInt32(); //2015.06.06. + byte[] buf = new byte[len]; //2015.06.06. + fs.Read(buf, 0, len); //2015.06.06. + var ms = new MemoryStream(buf); //2015.06.06. + ms.Seek(0, SeekOrigin.Begin); //2015.06.06. + var bitmap = new Bitmap(ms); + ms.Dispose(); //2015.06.06. + Emoticon emoticon = new Emoticon(id); //2015.06.06. + bitmap.MakeTransparent(Color.White); //2015.06.06. + emoticon.Image = (Bitmap)bitmap.Clone(); //2015.07.05. + bitmap.Dispose(); //2015.07.05. + Emoticons.Add(emoticon); //2015.06.06. + } + Name = Path.GetFileNameWithoutExtension(filename); //2015.06.06. + TextFormats.Add(this); //2015.06.06. + fs.Dispose(); //2015.06.06. + br.Dispose(); //2015.06.06. + return true; + } + + public void UnloadFromPack() //2015.05.03. + { //2015.05.24. + foreach (var entry in Emoticons) //<-- 2015.06.06. + entry.Image.Dispose(); //2015.07.05. + } + + private string Name; + + public override string ToString() + { //2015.06.06. + return Name; + } + + public void AddPack(string filename) + { + FileName = filename; + } + + public void SavePack(string filename) + { //2015.06.06. + var fs = File.Open(filename, FileMode.Create); + var bw = new BinaryWriter(fs); + bw.Write(Emoticons.Count); + for (int i = 0; i < Emoticons.Count; i++) + { + bw.Write(Emoticons[i].Value); + var ms = new MemoryStream(); + Emoticons[i].Image.Save(ms, ImageFormat.Gif); //2015.07.05. + bw.Write((int)ms.Length); + ms.Seek(0, SeekOrigin.Begin); + ms.CopyTo(fs); + ms.Dispose(); + } + fs.Dispose(); + } + + public string FileName + { + get; + set; } } - class ImgReplaceStrs - { - public string Text; - public Image Image; + public class Emoticon + { //2015.06.06. + public Bitmap Image; //2015.07.05. + public string Value; + public Emoticon(string value) + { + Value = value; + } } } diff --git a/MSGer.tk/Theme/.justforgithub b/MSGer.tk/Theme/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/Theme/MSGerToolStripRenderer.cs b/MSGer.tk/Theme/MSGerToolStripRenderer.cs new file mode 100644 index 0000000..327dab0 --- /dev/null +++ b/MSGer.tk/Theme/MSGerToolStripRenderer.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + /*class MSGerToolStripRenderer : ToolStripRenderer + { //TO!DO + protected override void Initialize(ToolStrip toolStrip) + { + base.Initialize(toolStrip); + toolStrip.ForeColor = Color.Blue; //2015.05.16. + } + protected override void InitializeContentPanel(ToolStripContentPanel contentPanel) + { + base.InitializeContentPanel(contentPanel); + } + protected override void InitializeItem(ToolStripItem item) + { + base.InitializeItem(item); + item.ForeColor = Color.Blue; //2015.05.16. + } + protected override void InitializePanel(ToolStripPanel toolStripPanel) + { + base.InitializePanel(toolStripPanel); + } + protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) + { + base.OnRenderArrow(e); + } + protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderButtonBackground(e); + } + protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderDropDownButtonBackground(e); + } + protected override void OnRenderGrip(ToolStripGripRenderEventArgs e) + { + base.OnRenderGrip(e); + } + protected override void OnRenderImageMargin(ToolStripRenderEventArgs e) + { + base.OnRenderImageMargin(e); + // + } + protected override void OnRenderItemBackground(ToolStripItemRenderEventArgs e) + { + //base.OnRenderItemBackground(e); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(0, 0, e.Item.Width, e.Item.Height)); + e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), e.Item.Bounds); + } + protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) + { + base.OnRenderItemCheck(e); + } + protected override void OnRenderItemImage(ToolStripItemImageRenderEventArgs e) + { + base.OnRenderItemImage(e); + } + protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) + { + base.OnRenderItemText(e); + // + } + protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderLabelBackground(e); + } + protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderMenuItemBackground(e); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(0, 0, e.Item.Width, e.Item.Height)); + e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), e.Item.Bounds); + } + protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderOverflowButtonBackground(e); + } + protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) + { + base.OnRenderSeparator(e); + // + } + protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderSplitButtonBackground(e); + } + protected override void OnRenderStatusStripSizingGrip(ToolStripRenderEventArgs e) + { + base.OnRenderStatusStripSizingGrip(e); + } + protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) + { + base.OnRenderToolStripBackground(e); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(0, 0, e.ToolStrip.Width, e.ToolStrip.Height)); + //e.Graphics.DrawRectangle(new Pen(Brushes.Blue), e.AffectedBounds); + //e.Graphics.FillRectangle(Brushes.DarkBlue, e.AffectedBounds); //2015.05.16. + //e.Graphics.DrawImage(Properties.Resources.Blue_Wallpaper_HD_2, new Point()); //2015.05.16. + //Theme.SkinThis(Theme.ThemePart.MenuBackground, e.Graphics); //2015.05.22. + } + protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) + { + base.OnRenderToolStripBorder(e); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.LightBlue)), new Rectangle(0, 0, e.ToolStrip.Width, e.ToolStrip.Height)); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.LightBlue)), e.AffectedBounds); + //e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.LightBlue)), e.AffectedBounds); //2015.05.16. + } + protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) + { + base.OnRenderToolStripContentPanelBackground(e); + } + protected override void OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e) + { + base.OnRenderToolStripPanelBackground(e); + } + protected override void OnRenderToolStripStatusLabelBackground(ToolStripItemRenderEventArgs e) + { + base.OnRenderToolStripStatusLabelBackground(e); + } + }*/ +} diff --git a/MSGer.tk/Theme/NoImage.cs b/MSGer.tk/Theme/NoImage.cs new file mode 100644 index 0000000..677679d --- /dev/null +++ b/MSGer.tk/Theme/NoImage.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MSGer.tk +{ + public class NoImage //TODO: Kiválasztható legyen az összes típus egy listából + { //2015.07.03. + public Image NoImg = new Bitmap(200, 200); + } +} diff --git a/MSGer.tk/Theme/Theme.cs b/MSGer.tk/Theme/Theme.cs new file mode 100644 index 0000000..56ed6c0 --- /dev/null +++ b/MSGer.tk/Theme/Theme.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public class Theme : IPackable, IPackWithDefaults, IPackWithSave + { + public void Save(string themepath) + { + //2015.05.03. + var fs = File.Open(themepath, FileMode.Create); + var bw = new BinaryWriter(fs); + bw.Write(Name); //Név + bw.Write(Description); //Leírás + bw.Write(Creators); //Készítő(k) + bw.Write(Controls.Count); + foreach (var pair in Controls) //2015.07.03. + { //2015.07.03. + bw.Write(pair.Key.AssemblyQualifiedName); //2015.07.05. + pair.Value.Save(bw); + } + } + private Theme() + { //2015.04.11. + + } + public Dictionary> ControlsByType = new Dictionary>(); //2015.07.03. + public static void ApplyTheme(Type onlythis = null) + { //2015.07.03. + var action = new Action>((type, list) => + { + foreach (Control control in list) + SkinControl(control); + }); + if (onlythis == null) + { + foreach (var item in CurrentTheme.ControlsByType) + action(item.Key, item.Value); + } + else + action(onlythis, CurrentTheme.ControlsByType[onlythis]); + } + + public static void SkinControl(Control control) + { + using (var gr = control.CreateGraphics()) //2015.07.03. + SkinThis(control.GetType(), gr); //2015.07.03. + + } + + //TODO: (2015.04.11.) Ne csak képeket tudjon kezelni, háttérszíneket, előtérszíneket, akár betűméretet/típust is + //TODO: (2015.04.11.) Egyedi betűtípusokat is - Talán + public Dictionary Controls = new Dictionary(); //2015.07.03. + public static List Themes = new List(); + private static Theme currenttheme; //2015.05.22. + public static Theme CurrentTheme + { + get + { //2015.05.22. + if (currenttheme == null) + { + currenttheme = Themes.FirstOrDefault(entry => entry.Name == Storage.Settings[SettingType.Theme]); //Single-->FirstOrDefault: 2015.06.06. + } + return currenttheme; + } + set + { //2015.05.22. + currenttheme = value; + Storage.Settings[SettingType.Theme] = currenttheme.Name; + } + } + + public string Name; + public string Description; + public string Creators; + + public bool LoadFromPack(string filename) + { + var fs = File.Open(filename, FileMode.Open); + var br = new BinaryReader(fs); + if (fs.Length < 5) + return false; //2015.07.05. + Name = br.ReadString(); //Név + Description = br.ReadString(); //Leírás + Creators = br.ReadString(); //Készítő(k) + int count = br.ReadInt32(); //2015.05.03. + for (int i = 0; i < count; i++) + { + string tmp = br.ReadString(); + Type type = Type.GetType(tmp); + ThemeControl control = new ThemeControl(br); + Controls.Add(type, control); //2015.07.03. + } + Themes.Add(this); + if (CurrentTheme == null) //TODO: TMP + CurrentTheme = this; //2015.07.05. + return true; + } + + public void UnloadFromPack() + { + //Ha törli az egységes listából, törli az egész rendszerből + } + + public static void SkinThis(Type controltype, Graphics graphics) //controltype: 2015.07.03. + { //2015.05.22. + if (CurrentTheme == null) + return; + if(!CurrentTheme.Controls.ContainsKey(controltype)) + { //2015.07.03. + //MessageBox.Show("Cannot theme this control type: " + controltype); //TODO: Több téma támogatása egyszerre (Minecraft resource pack) + return; + } + ThemeControl control = CurrentTheme.Controls[controltype]; + switch (control.ControlType) + { + case ThemeControlTypes.Colors: + graphics.FillRectangle(new SolidBrush(control.Color), graphics.ClipBounds); //2015.07.05. + break; + case ThemeControlTypes.Dynamic: //2015.07.05. + IScriptTheme script = null; //TODO + script.SkinThis(controltype, control, graphics); + break; + case ThemeControlTypes.Image: //2015.07.05. + graphics.DrawImage(control.Image, new Rectangle(new Point(), graphics.ClipBounds.Size.ToSize())); + break; + } + } + public static void SetRenderer(ToolStrip toolstrip) //2015.07.05. + { //TODO + + } + public override string ToString() + { //2015.07.03. + return Name; + } + + public void AddPack(string filename) + { + FileName = filename; + Name = Path.GetFileNameWithoutExtension(filename); //2015.07.05. + Description = ""; //TODO - 2015.07.05. + Creators = ""; //2015.07.05. + } + + public void SavePack(string filename) + { //2015.07.03. + Save(filename); + } + + public string FileName + { //2015.07.03. + get; + set; + } + } +} diff --git a/MSGer.tk/Theme/ThemeControl.cs b/MSGer.tk/Theme/ThemeControl.cs new file mode 100644 index 0000000..3c2f206 --- /dev/null +++ b/MSGer.tk/Theme/ThemeControl.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Text; + +namespace MSGer.tk +{ + public class ThemeControl + { //2015.04.11. + public ThemeControlTypes ControlType { get; private set; } //2015.05.03. + public Image Image { get; private set; } //2015.05.03. + public string Script { get; private set; } //2015.05.03. + public Color Color { get; private set; } //2015.07.05. + public Color ForeColor { get; private set; } //2015.05.16. + + public ThemeControl(BinaryReader br) + { + var type = (ThemeControlTypes)br.ReadInt32(); + ControlType = type; //2015.05.16. + ForeColor = Color.FromArgb(br.ReadInt32()); //2015.05.16. + switch (type) + { + case ThemeControlTypes.Dynamic: + { //2015.05.16. + Script = br.ReadString(); + break; + } + case ThemeControlTypes.Image: + { //2015.05.16. + int len = br.ReadInt32(); + byte[] imgdata = br.ReadBytes(len); + MemoryStream ms = new MemoryStream(imgdata); + Image = Image.FromStream(ms); + break; + } + case ThemeControlTypes.Colors: + { //2015.05.22. + ForeColor = Color.FromArgb(br.ReadInt32()); + Color = Color.FromArgb(br.ReadInt32()); //2015.07.05. + break; + } + } + } + + public ThemeControl(Color forecolor, Image image) + { //2015.07.04. + ControlType = ThemeControlTypes.Image; //2015.07.05. + ForeColor = forecolor; + Image = image; + } + + public ThemeControl(Color forecolor, Color color) + { //2015.07.04. + ControlType = ThemeControlTypes.Colors; //2015.07.05. + ForeColor = forecolor; + Color = color; //2015.07.05. + } + + public ThemeControl(Color forecolor, string script) + { //2015.07.04. + ControlType = ThemeControlTypes.Dynamic; //2015.07.05. + ForeColor = forecolor; + Script = script; + } + + public void Save(BinaryWriter bw) + { //2015.05.16. + bw.Write((int)ControlType); + bw.Write(ForeColor.ToArgb()); + switch (ControlType) + { + case ThemeControlTypes.Dynamic: + { + bw.Write(Script); + break; + } + case ThemeControlTypes.Image: + { + MemoryStream ms = new MemoryStream(); + Image.Save(ms, ImageFormat.Tiff); + bw.Write(ms.Length); + bw.Write(ms.ToArray()); + break; + } + case ThemeControlTypes.Colors: + { //2015.05.22. + bw.Write(ForeColor.ToArgb()); + bw.Write(Color.ToArgb()); //2015.07.05. + break; + } + } + } + } + public enum ThemeControlTypes + { //2015.04.11. + Dynamic, + Image, + Colors + } +} diff --git a/MSGer.tk/Theme/ThemedForms.Designer.cs b/MSGer.tk/Theme/ThemedForms.Designer.cs new file mode 100644 index 0000000..074a872 --- /dev/null +++ b/MSGer.tk/Theme/ThemedForms.Designer.cs @@ -0,0 +1,120 @@ +namespace MSGer.tk +{ + partial class ThemedForms + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.containerPanel = new System.Windows.Forms.Panel(); + this.titleLabel = new System.Windows.Forms.Label(); + this.CloseButton = new System.Windows.Forms.PictureBox(); + this.MaximizeButton = new System.Windows.Forms.PictureBox(); + this.MinimizeButton = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.CloseButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaximizeButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinimizeButton)).BeginInit(); + this.SuspendLayout(); + // + // containerPanel + // + this.containerPanel.Location = new System.Drawing.Point(12, 30); + this.containerPanel.Name = "containerPanel"; + this.containerPanel.Size = new System.Drawing.Size(123, 51); + this.containerPanel.TabIndex = 0; + // + // titleLabel + // + this.titleLabel.AutoSize = true; + this.titleLabel.Location = new System.Drawing.Point(13, 11); + this.titleLabel.Name = "titleLabel"; + this.titleLabel.Size = new System.Drawing.Size(27, 13); + this.titleLabel.TabIndex = 1; + this.titleLabel.Text = "Title"; + // + // CloseButton + // + this.CloseButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.CloseButton.Location = new System.Drawing.Point(122, 1); + this.CloseButton.Name = "CloseButton"; + this.CloseButton.Size = new System.Drawing.Size(24, 23); + this.CloseButton.TabIndex = 2; + this.CloseButton.TabStop = false; + this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click); + // + // MaximizeButton + // + this.MaximizeButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.MaximizeButton.Location = new System.Drawing.Point(92, 1); + this.MaximizeButton.Name = "MaximizeButton"; + this.MaximizeButton.Size = new System.Drawing.Size(24, 23); + this.MaximizeButton.TabIndex = 3; + this.MaximizeButton.TabStop = false; + this.MaximizeButton.Click += new System.EventHandler(this.MaximizeButton_Click); + // + // MinimizeButton + // + this.MinimizeButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.MinimizeButton.Location = new System.Drawing.Point(62, 1); + this.MinimizeButton.Name = "MinimizeButton"; + this.MinimizeButton.Size = new System.Drawing.Size(24, 23); + this.MinimizeButton.TabIndex = 4; + this.MinimizeButton.TabStop = false; + this.MinimizeButton.Click += new System.EventHandler(this.MinimizeButton_Click); + // + // ThemedForms + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(147, 93); + this.Controls.Add(this.MinimizeButton); + this.Controls.Add(this.MaximizeButton); + this.Controls.Add(this.CloseButton); + this.Controls.Add(this.titleLabel); + this.Controls.Add(this.containerPanel); + this.Name = "ThemedForms"; + this.Text = "ThemedForms"; + this.DoubleClick += new System.EventHandler(this.ThemedForms_DoubleClick); + this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ThemedForms_MouseDown); + this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ThemedForms_MouseUp); + this.Resize += new System.EventHandler(this.ThemedForms_Resize); + ((System.ComponentModel.ISupportInitialize)(this.CloseButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaximizeButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinimizeButton)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + + private System.Windows.Forms.Panel containerPanel; + private System.Windows.Forms.Label titleLabel; + private System.Windows.Forms.PictureBox CloseButton; + private System.Windows.Forms.PictureBox MaximizeButton; + private System.Windows.Forms.PictureBox MinimizeButton; + } +} \ No newline at end of file diff --git a/MSGer.tk/Theme/ThemedForms.cs b/MSGer.tk/Theme/ThemedForms.cs new file mode 100644 index 0000000..053f126 --- /dev/null +++ b/MSGer.tk/Theme/ThemedForms.cs @@ -0,0 +1,258 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MSGer.tk +{ + public partial class ThemedForms : Form + { //2014.12.21. + public const int BorderSize = 3; + + private bool overridecontrols = false; + public ThemedForms() + { + InitializeComponent(); + this.Load += ThemedForms_Load; + overridecontrols = true; + } + + public void ThemedForms_Load(object sender, EventArgs e) + { + List anchors = new List(); + foreach (Control control in containerPanel.Controls) + { + anchors.Add(control.Anchor); + control.Anchor = AnchorStyles.Top | AnchorStyles.Left; + } + this.SuspendLayout(); + base.FormBorderStyle = FormBorderStyle.None; + this.Size = base.Size; + CloseButton.Location = new Point(this.Size.Width - CloseButton.Size.Width, 0); + MaximizeButton.Location = new Point(this.Size.Width - CloseButton.Size.Width - MaximizeButton.Size.Width, 0); + MinimizeButton.Location = new Point(this.Size.Width - CloseButton.Size.Width - MaximizeButton.Size.Width - MinimizeButton.Size.Width, 0); + titleLabel.Location = new Point(BorderSize, titleLabel.Location.Y); + containerPanel.Location = new Point(BorderSize, titleLabel.Location.Y + titleLabel.Size.Height); + int i = 0; + this.ResumeLayout(true); + foreach (var anchor in anchors) + { + containerPanel.Controls[i].Anchor = anchor; + i++; + } + titleLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left; + CloseButton.Anchor = AnchorStyles.Top | AnchorStyles.Right; + MaximizeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right; + MinimizeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right; + containerPanel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom; + PrepControl(this); + foreach (Control control in this.Controls) + { + PrepControl(control); //TODO: Controls.ControlAdded-nél is az új control-ra alkalmazza + if (control is ToolStrip) + Theme.SetRenderer((ToolStrip)control); //2015.07.05. + foreach (Control ctrl in control.GetAll()) + { //2015.07.03. + PrepControl(ctrl); + } + var controls = control.GetAll(typeof(ToolStrip)); + foreach (ToolStrip toolstrip in controls) + { + Theme.SetRenderer(toolstrip); //2015.07.05. + } + } + } + private void PrepControl(Control control) + { //2015.07.03. + Theme.SkinControl(control); + control.Click += control_Click; + } + + public static ThemeDesigner ThemeDesignerRunning; //2015.07.03. + void control_Click(object sender, EventArgs e) + { + if (ThemeDesignerRunning != null) + { //2015.07.03. + ThemeDesignerRunning.SelectedType = sender.GetType(); + } + } + public new Control.ControlCollection Controls + { + get + { + if (overridecontrols) + return containerPanel.Controls; + else + return base.Controls; + } + } + private FormBorderStyle borderstyle = FormBorderStyle.Sizable; + public new FormBorderStyle FormBorderStyle + { + get + { + return borderstyle; + } + set + { + borderstyle = value; + base.FormBorderStyle = FormBorderStyle.None; + } + } + public override string Text + { + get + { + return base.Text; + } + set + { + titleLabel.Text = value; + base.Text = value; + } + } + public new Size Size + { + get + { + return base.Size; + } + set + { + base.Size = new Size(value.Width + containerPanel.Location.X + BorderSize, value.Height + containerPanel.Location.Y + BorderSize); + containerPanel.Size = value; + } + } + + private void CloseButton_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void MaximizeButton_Click(object sender, EventArgs e) + { + if (!MaximizeBox) + return; + FormWindowState ws; //Anti-virus program miatt + if (WindowState == FormWindowState.Normal) + ws = FormWindowState.Maximized; + else + ws = FormWindowState.Normal; + + Timer t = new Timer(); + t.Interval = 10; + t.Tick += delegate + { + t.Stop(); + base.FormBorderStyle = FormBorderStyle.Sizable; //Látszik egy kis időre, de tán így a legkönnyebb + WindowState = ws; + base.FormBorderStyle = FormBorderStyle.None; + }; + t.Start(); + } + + private void MinimizeButton_Click(object sender, EventArgs e) + { + if (!MinimizeBox) + return; + WindowState = FormWindowState.Minimized; + } + + private FormWindowState wstate; + private void ThemedForms_Resize(object sender, EventArgs e) + { + if (this.WindowState == wstate) + return; + if (this.WindowState == FormWindowState.Maximized && wstate == FormWindowState.Minimized) //minimized-ről váltott maximized-re + { + this.WindowState = FormWindowState.Normal; + base.FormBorderStyle = FormBorderStyle.Sizable; + this.WindowState = FormWindowState.Maximized; + base.FormBorderStyle = FormBorderStyle.None; + } + wstate = this.WindowState; + } + + private bool moving = false; + private int resizing = 0; + private Timer moveresizetimer = new Timer(); + private Point moveresizecursor; + private void ThemedForms_MouseDown(object sender, MouseEventArgs e) + { + Point cursorpos = this.PointToClient(Cursor.Position); + moveresizecursor = this.PointToClient(Cursor.Position); //Mindig ehhez igazítsa + if (cursorpos.X > containerPanel.Location.X + containerPanel.Size.Width) + resizing = 1; //right + else if (cursorpos.X < containerPanel.Location.X) + resizing = 2; //left + else if (cursorpos.Y > containerPanel.Location.Y + containerPanel.Size.Height) + resizing = 3; //bottom + else if (cursorpos.Y < containerPanel.Location.Y) + moving = true; //top + if (!moveresizetimer.Enabled) + { + moveresizetimer.Interval = 10; + moveresizetimer.Tick += moveresizetimer_Tick; + moveresizetimer.Start(); + } + } + + void moveresizetimer_Tick(object sender, EventArgs e) + { + if (moving) + { + int diffx = this.PointToClient(Cursor.Position).X - moveresizecursor.X; + int diffy = this.PointToClient(Cursor.Position).Y - moveresizecursor.Y; + this.Location = new Point(this.Location.X + diffx, this.Location.Y + diffy); + } + if (resizing > 0 && borderstyle == FormBorderStyle.Sizable) + { + if (resizing == 1) + base.Size = new Size(Cursor.Position.X - base.Location.X, base.Size.Height); + else if (resizing == 2) + { + int diff = base.Location.X - Cursor.Position.X; + base.Location = new Point(Cursor.Position.X, base.Location.Y); + base.Size = new Size(base.Size.Width + diff, base.Size.Height); + } + else if (resizing == 3) + base.Size = new Size(base.Size.Width, Cursor.Position.Y - base.Location.Y); + } + } + + private void ThemedForms_MouseUp(object sender, MouseEventArgs e) + { + moving = false; + resizing = 0; + moveresizetimer.Stop(); + } + + private void ThemedForms_DoubleClick(object sender, EventArgs e) + { + if (this.PointToClient(Cursor.Position).Y < containerPanel.Location.Y) + { + if (!MaximizeBox) + return; //2015.04.08. + if (this.WindowState == FormWindowState.Normal) + { + this.WindowState = FormWindowState.Normal; + base.FormBorderStyle = FormBorderStyle.Sizable; + this.WindowState = FormWindowState.Maximized; + base.FormBorderStyle = FormBorderStyle.None; + } + else + this.WindowState = FormWindowState.Normal; + } + } + + public Control.ControlCollection GetOriginalControls() + { + return base.Controls; + } + } +} diff --git a/MSGer.tk/Theme/ThemedForms.resx b/MSGer.tk/Theme/ThemedForms.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGer.tk/Theme/ThemedForms.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGer.tk/UserInfo.cs b/MSGer.tk/UserInfo.cs index f5a9e11..81d00cb 100644 --- a/MSGer.tk/UserInfo.cs +++ b/MSGer.tk/UserInfo.cs @@ -8,6 +8,9 @@ using System.Windows.Forms; using Khendys.Controls; using SzNPProjects; using System.Net; +using System.Drawing; +using FastColoredTextBoxNS; +using System.Text.RegularExpressions; namespace MSGer.tk { @@ -167,7 +170,7 @@ namespace MSGer.tk Update(); } } - public int PicUpdateTime + public double PicUpdateTime //int-->double: 2015.06.06. { get { @@ -183,22 +186,10 @@ namespace MSGer.tk Update(); } } - public string ImagePath = "noimage.png"; - /*public struct IPEndPoint - Nincs már szükség az IsServer beállításra - { - public IPEndPoint IP; - public bool IsServer;*/ - /*public IPEndPoint(IPEndPoint ip) - { - IP = ip; - IsServer = false; - }*/ - /*public IPEndPoint(IPEndPoint ip, bool isserver) - { - IP = ip; - IsServer = isserver; - } - }*/ + /// + /// Ha null, akkor NoImage--et jelenítsen meg + /// + public Image Image; //2015.05.30. private static HashSet ips = new HashSet(); public static HashSet IPs @@ -233,54 +224,46 @@ namespace MSGer.tk ~UserInfo() //2014.10.09. { } - //public int PicUpdateTime = 0; - //public string GetImage() - public void GetImage(int receivedupdate) + public void GetImageFromNetwork(int receivedupdate) { //Most már elvileg csak akkor hívja meg, amikor feldolgozza a kapott adatokat, tehát nem a Main Thread-ban - string tmp = Path.GetTempPath(); - if (!Directory.Exists(tmp + "\\MSGer.tk\\pictures")) //2014.08.16. - Áthelyezve, hogy mindig létrehozza, ha kell, és letöltse a képeket - Directory.CreateDirectory(tmp + "\\MSGer.tk\\pictures"); - - if (this.PicUpdateTime > receivedupdate) - { - if (File.Exists(tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png")) - this.ImagePath = tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png"; - else - this.ImagePath = "noimage.png"; + if (this.PicUpdateTime >= receivedupdate) + { //2015.06.06. + LoadImageFromFile(); + return; } //2014.08.16. - A képeket azért nem menti felhasználónként, mert úgyis le tudja tölteni mindenkinek a képét szinte bárki, és amúgy is UserID-val van azonosítva - List sendb = new List(); - //sendb.AddRange(BitConverter.GetBytes(CurrentUser.UserID)); - sendb.AddRange(BitConverter.GetBytes(UserID)); - sendb.AddRange(BitConverter.GetBytes((File.Exists(tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png")) ? PicUpdateTime : 0)); - byte[][] bytesb = Networking.SendUpdate(Networking.UpdateType.GetImage, sendb.ToArray(), false); - if (bytesb == null || bytesb.All(entry => entry.Length == 0)) //bytesb.All(...): 2014.09.01. + var pfs = new Networking.PacketSender( + new Networking.PDGetImage(UserID, (Image != null ? PicUpdateTime : 0))).Send(); //Image!=null: 2015.06.06. + if (pfs == null || pfs.All(entry => !((Networking.PDGetImage)entry.EData).RSuccess)) { - if (File.Exists(tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png")) - this.ImagePath = tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png"; - else - this.ImagePath = "noimage.png"; + LoadImageFromFile(); //2015.06.06. + return; } - bytesb = bytesb.Select(entry => Networking.ParsePacket(entry).Data).ToArray(); - int[] picupdatetimes = bytesb.Select(b => BitConverter.ToInt32(b, 0)).ToArray(); - int maxIndex = Array.IndexOf(picupdatetimes, picupdatetimes.Max()); - //byte[] bytes = bytesb[maxIndex]; //Attól tölti le a képet, akinek a legfrissebb - byte[] bytes = new byte[bytesb[maxIndex].Length]; - Array.Copy(bytesb[maxIndex], 4, bytes, 0, bytes.Length); //Hagyja ki a PicUpdateTime-ot - - if (bytes[0] == 0x00) //Nincs kép, vagy hiba történt + IEnumerable picupdatetimes = pfs.Select(entry => ((Networking.PDGetImage)entry.EData).RPicUpdateTime); + byte[] bytes = null; + double max = picupdatetimes.Max(); //2015.06.06. + foreach (var entry in pfs) { - this.ImagePath = "noimage.png"; + if (((Networking.PDGetImage)entry.EData).RPicUpdateTime == max) + { + bytes = ((Networking.PDGetImage)entry.EData).RImageData; + break; + } + } + + if (bytes == null || bytes[0] == 0x00) //Nincs kép, vagy hiba történt + { + this.Image = null; //2015.05.30. } else if (bytes[0] == 0x01) { - this.ImagePath = tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png"; + LoadImageFromFile(); //2015.06.06. } else { //Mentse el a képet - File.WriteAllBytes(tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png", bytes); - this.ImagePath = tmp + "\\MSGer.tk\\pictures\\" + UserID + ".png"; //2014.08.16. + File.WriteAllBytes("pictures\\" + UserID + ".png", bytes); //2015.06.06. - Először a fogadott formátumban menti el, majd legközelebb már PNG-ként + LoadImageFromFile(); //2015.06.06. } } public List GetChatWindows() @@ -295,17 +278,41 @@ namespace MSGer.tk } return retlist; } + private void LoadImageFromFile() + { //2015.06.06. + //2015.06.14. + if (!Directory.Exists("pictures")) + Directory.CreateDirectory("pictures"); + string[] files = Directory.GetFiles("pictures", UserID + ".*"); + if (files.Length > 0) + this.Image = Program.LoadImageFromFile(files[0]); + else + this.Image = null; + } + /// + /// Csak a megjelenítéshez, ellenőrzéshez null-check + /// + public static Image NoImage = Properties.Resources.noimage; //2015.05.30. public static void Load() { + using (var gr = Graphics.FromImage(NoImage)) + Theme.SkinThis(typeof(NoImage), gr); //2015.07.03. foreach (var entry in Storage.LoggedInSettings) { - string[] tmp = entry.Key.Split('_'); - if (tmp[0] != "userinfo") - continue; - var tmp2 = new UserInfo(); - tmp2.UserID = Int32.Parse(tmp[1]); - if (!IDIsInList(KnownUsers, tmp2.UserID)) - KnownUsers.Add(tmp2); + try + { + string[] tmp = entry.Key.Split('_'); + if (tmp[0] != "userinfo") + continue; + var tmp2 = new UserInfo(); + tmp2.UserID = Int32.Parse(tmp[1]); + tmp2.LoadImageFromFile(); //2015.06.14. + if (!IDIsInList(KnownUsers, tmp2.UserID)) + KnownUsers.Add(tmp2); + } + catch + { + } } } public static bool IDIsInList(List list, int userid) @@ -314,14 +321,7 @@ namespace MSGer.tk } public static UserInfo Select(int userid) { - try - { - return KnownUsers.Single(entry => entry.UserID == userid); //2014.09.19. - } - catch - { - return null; - } + return KnownUsers.FirstOrDefault(entry => entry.UserID == userid); //Single-->FirstOrDefault: 2015.06.06. } public static int GetUserIDFromListID(int ListID) { @@ -340,34 +340,22 @@ namespace MSGer.tk return; if (!UpdateTimer.Enabled) { - UpdateTimer.Interval = 500; - UpdateTimer.Tick += UpdateTimerTick; - UpdateTimer.Start(); + if (UpdateTimer.Tag == null || !(bool)UpdateTimer.Tag) + { + UpdateTimer.Interval = 500; + UpdateTimer.Tick += UpdateTimerTick; + UpdateTimer.Tag = true; + } + if (Program.MainF.InvokeRequired) + Program.MainF.Invoke(new Action(() => UpdateTimer.Start())); + else + UpdateTimer.Start(); } } private void UpdateTimerTick(object sender, EventArgs e) { UpdateTimer.Stop(); - //Partnerlista frissítése - //2014.10.09. - /*string imgpath = this.GetImage(); - if (!(imgpath != "noimage.png" || File.Exists("noimage.png"))) //2014.03.13. - 2014.10.09. - { - imgpath = ""; - MessageBox.Show(Language.Translate("noimage_notfound"), Language.Translate("error")); - } - string state = ""; - if (this.State == 1) - state = " (" + Language.Translate("menu_file_status_online") + ")"; - else if (this.State == 2) - state = " (" + Language.Translate("menu_file_status_busy") + ")"; - else if (this.State == 3) - state = " (" + Language.Translate("menu_file_status_away") + ")"; - else - state = " (" + Language.Translate("offline") + ")"; - string text = this.Name + state + "\n" + this.Message; - */ if (ListID == -1) { int i; @@ -380,51 +368,20 @@ namespace MSGer.tk } ListID = i; } - //2014.10.09. - /*bool tmp = Program.MainF.contactList.AutoUpdate; - Program.MainF.contactList.AutoUpdate = false; - while (Program.MainF.contactList.Items.Count <= ListID) //Azt is adja hozzá, ami a kész listaelem lesz - { - var pictb = new PictureBox(); - pictb.SizeMode = PictureBoxSizeMode.Zoom; - pictb.ImageLocation = imgpath; - var listtext = new ExRichTextBox(); - listtext.Text = text; - listtext = TextFormat.Parse(listtext); - Program.MainF.contactList.Items.Add(new RichListViewItem(new Control[] { pictb, listtext })); - } - ((PictureBox)Program.MainF.contactList.Items[ListID].SubItems[0]).ImageLocation = imgpath; - Program.MainF.contactList.Items[ListID].SubItems[1].Text = text; - Program.MainF.contactList.Items[ListID].SubItems[1] = TextFormat.Parse((ExRichTextBox)Program.MainF.contactList.Items[ListID].SubItems[1]); - Program.MainF.contactList.AutoUpdate = tmp;*/ - CreateListItem(Program.MainF.contactList, ListID); } - /*internal static int GetPortForIP(IPAddress iPAddress) - Elküldi - { - throw new NotImplementedException(); //TODO - }*/ - public void CreateListItem(RichListView listView, int pos) { - //TO!DO: A fenti kódot átrakni ide, hogy itt létrehozza az item-et - //string imgpath = this.GetImage(); - string imgpath = this.ImagePath; //2014.12.31. - if (!(imgpath != "noimage.png" || File.Exists("noimage.png"))) //2014.03.13. - 2014.10.09. - { - imgpath = ""; - MessageBox.Show(Language.Translate("noimage_notfound"), Language.Translate("error")); - } string state = ""; if (this.State == 1) - state = " (" + Language.Translate("menu_file_status_online") + ")"; + state = " (" + Language.Translate(Language.StringID.Menu_File_Status_Online) + ")"; else if (this.State == 2) - state = " (" + Language.Translate("menu_file_status_busy") + ")"; + state = " (" + Language.Translate(Language.StringID.Menu_File_Status_Busy) + ")"; else if (this.State == 3) - state = " (" + Language.Translate("menu_file_status_away") + ")"; + state = " (" + Language.Translate(Language.StringID.Menu_File_Status_Away) + ")"; else - state = " (" + Language.Translate("offline") + ")"; + state = " (" + Language.Translate(Language.StringID.Offline) + ")"; string text = this.Name + state + "\n" + this.Message; TMPListID = pos; @@ -436,17 +393,51 @@ namespace MSGer.tk { var pictb = new PictureBox(); pictb.SizeMode = PictureBoxSizeMode.Zoom; - pictb.ImageLocation = imgpath; - var listtext = new ExRichTextBox(); - listtext.Text = text; - listtext = TextFormat.Parse(listtext); - listView.Items.Add(new RichListViewItem(new Control[] { pictb, listtext })); + pictb.Image = Image; //2015.05.30. + var listtext = new FastColoredTextBox(); //2015.07.05. + listtext.ShowLineNumbers = false; //2015.07.05. + var style = new TextBoxHelpers.GifImageStyle(listtext); //2015.07.05. + foreach (var item in TextFormat.TextFormats) + { //2015.07.05. + foreach (var item2 in item.Emoticons) + { + style.ImagesByText.Add(item2.Value, item2.Image); + } + } + listtext.Text = text; //2015.07.05. + listtext.TextChanged += delegate(object sender, TextChangedEventArgs e) + { + if (style == null) + return; + e.ChangedRange.ClearStyle(StyleIndex.All); + foreach (var key in style.ImagesByText.Keys) + { + string pattern = Regex.Replace(key, RegexSpecSymbolsPattern, "\\$0"); + e.ChangedRange.SetStyle(style, pattern); + } + }; + style.StartAnimation(); //2015.07.05. + listtext.OnTextChanged(); //2015.07.05. + listView.Items.Add(new RichListViewItem(new Control[] { pictb, listtext })); //2015.07.05. } - ((PictureBox)listView.Items[TMPListID].SubItems[0]).ImageLocation = imgpath; + if (Image == null) //2015.05.30. + ((PictureBox)listView.Items[TMPListID].SubItems[0]).Image = UserInfo.NoImage; //2015.05.30. + else + ((PictureBox)listView.Items[TMPListID].SubItems[0]).Image = Image; //2015.05.30. listView.Items[TMPListID].SubItems[1].Text = text; - listView.Items[TMPListID].SubItems[1] = TextFormat.Parse((ExRichTextBox)listView.Items[TMPListID].SubItems[1]); listView.AutoUpdate = tmp; listView.ResumeLayout(true); //2014.12.21. } + const string RegexSpecSymbolsPattern = @"[\^\$\[\]\(\)\.\\\*\+\|\?\{\}]"; + + public override string ToString() + { //2015.04.03. + string str = ""; + foreach (var setting in Storage.LoggedInSettings) + if (setting.Key.StartsWith("userinfo_" + UserID + "_")) + str += setting.Key.Substring(setting.Key.IndexOf(UserID.ToString())) + "=" + setting.Value + "\n"; + str = str.Remove(str.Length - 1); + return str; + } } } diff --git a/MSGer.tk/bin/.justforgithub b/MSGer.tk/bin/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/.justforgithub b/MSGer.tk/bin/Debug/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/1.db b/MSGer.tk/bin/Debug/1.db index 4257df2..612226d 100644 Binary files a/MSGer.tk/bin/Debug/1.db and b/MSGer.tk/bin/Debug/1.db differ diff --git a/MSGer.tk/bin/Debug/2.db b/MSGer.tk/bin/Debug/2.db index 7d2254c..67b294b 100644 Binary files a/MSGer.tk/bin/Debug/2.db and b/MSGer.tk/bin/Debug/2.db differ diff --git a/MSGer.tk/bin/Debug/FastColoredTextBox.dll b/MSGer.tk/bin/Debug/FastColoredTextBox.dll new file mode 100644 index 0000000..3480541 Binary files /dev/null and b/MSGer.tk/bin/Debug/FastColoredTextBox.dll differ diff --git a/MSGer.tk/bin/Debug/FastColoredTextBox.xml b/MSGer.tk/bin/Debug/FastColoredTextBox.xml new file mode 100644 index 0000000..7213b1e --- /dev/null +++ b/MSGer.tk/bin/Debug/FastColoredTextBox.xml @@ -0,0 +1,3188 @@ + + + + FastColoredTextBox + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Highlights syntax for given language + + + + + Highlights syntax for given XML description file + + + + + Highlights C# code + + + + + + Highlights VB code + + + + + + Highlights HTML code + + + + + + Highlights XML code + + + + + + Highlights SQL code + + + + + + Highlights PHP code + + + + + + Highlights JavaScript code + + + + + + Highlights Lua code + + + + + + String style + + + + + Comment style + + + + + Number style + + + + + C# attribute style + + + + + Class name style + + + + + Keyword style + + + + + Style of tags in comments of C# + + + + + HTML attribute value style + + + + + HTML tag brackets style + + + + + HTML tag name style + + + + + HTML Entity style + + + + + XML attribute style + + + + + XML attribute value style + + + + + XML tag brackets style + + + + + XML tag name style + + + + + XML Entity style + + + + + XML CData style + + + + + Variable style + + + + + Specific PHP keyword style + + + + + Specific PHP keyword style + + + + + SQL Statements style + + + + + SQL Functions style + + + + + SQL Types style + + + + + Language + + + + + Item of autocomplete menu + + + + + Returns text for inserting into Textbox + + + + + Compares fragment text with this item + + + + + Returns text for display into popup menu + + + + + This method is called after item inserted into text + + + + + Title for tooltip. + + Return null for disable tooltip for this item + + + + Tooltip text. + + For display tooltip text, ToolTipTitle must be not null + + + + Menu text. This text is displayed in the drop-down menu. + + + + + Fore color of text of item + + + + + Back color of item + + + + + Item do not appears + + + + + Item appears + + + + + Item appears and will selected + + + + + Autocomplete item for code snippets + + Snippet can contain special char ^ for caret position. + + + + Compares fragment text with this item + + + + + This autocomplete item appears after dot + + + + + This Item does not check correspondence to current text fragment. + SuggestItem is intended for dynamic menus. + + + + + Style of chars + + This is base class for all text and design renderers + + + + Constructor + + + + + Renders given range of text + + Graphics object + Position of the range in absolute control coordinates + Rendering range of text + + + + Occurs when user click on StyleVisualMarker joined to this style + + + + + Shows VisualMarker + Call this method in Draw method, when you need to show VisualMarker for your style + + + + + Returns CSS for export to HTML + + + + + + Returns RTF descriptor for export to RTF + + + + + + This style is exported to outer formats (HTML for example) + + + + + Occurs when user click on StyleVisualMarker joined to this style + + + + + Style for chars rendering + This renderer can draws chars, with defined fore and back colors + + + + + Renderer for folded block + + + + + Renderer for selected area + + + + + Marker style + Draws background color for text + + + + + Draws small rectangle for popup menu + + + + + This style draws a wavy line below a given text range. + + Thanks for Yallie + + + + This style is used to mark range of text as ReadOnly block + + You can inherite this style to add visual effects of readonly text + + + + Popup menu for autocomplete + + + + + Shows popup menu immediately + + If True - MinFragmentLength will be ignored + + + + Regex pattern for serach fragment around caret + + + + + Minimum fragment length for popup + + + + + User selects item + + + + + It fires after item inserting + + + + + Occurs when popup menu is opening + + + + + Allow TAB for select menu item + + + + + Interval of menu appear (ms) + + + + + Back color of selected item + + + + + Border color of hovered item + + + + + Minimal size of menu + + + + + Image list of menu + + + + + Tooltip duration (ms) + + + + + Tooltip + + + + + This class contains the source text (chars and styles). + It stores a text lines, the manager of commands, undo/redo stack, styles. + + + + + This class contains the source text (chars and styles). + It stores a text lines, the manager of commands, undo/redo stack, styles. + + + + + Styles + + + + + Text lines + + + + + Occurs when line was inserted/added + + + + + Occurs when line was removed + + + + + Occurs when text was changed + + + + + Occurs when recalc is needed + + + + + Occurs when recalc wordwrap is needed + + + + + Occurs before text changing + + + + + Occurs after CurrentTB was changed + + + + + Current focused FastColoredTextBox + + + + + Default text style + This style is using when no one other TextStyle is not defined in Char.style + + + + + Lines count + + + + + Occurs when need to display line in the textbox + + + + + Occurs when need to save line in the file + + + + + End Of Line characters used for saving + + + + + This text will be displayed in textbox + + + + + This property contains only changed text. + If text of line is not changed, this property contains null. + + + + + This text will be saved in the file + + + + + This class records, stores and executes the macros. + + + + + Executes recorded macro + + + + + + Adds the char to current macro + + + + + Adds keyboard key to current macro + + + + + Clears last recorded macro + + + + + Allows to user to record macros + + + + + Returns current recording state. Set to True/False to start/stop recording programmatically. + + + + + FCTB + + + + + Returns True if last macro is empty + + + + + Macros as string. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + These classes are required for correct data binding to Text property of FastColoredTextbox + + + + + Diapason of text chars + + + + + Constructor + + + + + Constructor + + + + + Constructor + + + + + Constructor. Creates range of the line + + + + + Returns intersection with other range, + empty range returned otherwise + + + + + + + Returns union with other range. + + + + + + + Select all chars of control + + + + + Returns required char's number before start of the Range + + + + + Returns required char's number after start of the Range + + + + + Clone range + + + + + + Move range right + + This method jump over folded blocks + + + + Move range left + + This method can to go inside folded blocks + + + + Move range left + + This method jump over folded blocks + + + + Move range left + + This method can to go inside folded blocks + + + + Set style for range + + + + + Set style for given regex pattern + + + + + Set style for given regex + + + + + Set style for given regex pattern + + + + + Set style for given regex pattern + + + + + Set style for given regex pattern + + + + + Appends style to chars of range + + + + + Sets folding markers + + Pattern for start folding line + Pattern for finish folding line + + + + Sets folding markers + + Pattern for start folding line + Pattern for finish folding line + + + + Sets folding markers + + Pattern for start and end folding line + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern. + Search is separately in each line. + This method requires less memory than GetRanges(). + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex. + Search is separately in each line. + This method requires less memory than GetRanges(). + + Regex + Enumeration of ranges + + + + Finds ranges for given regex pattern. + Search is separately in each line (order of lines is reversed). + This method requires less memory than GetRanges(). + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex + + Enumeration of ranges + + + + Clear styles of range + + + + + Clear styles of range + + + + + Clear folding markers of all lines of range + + + + + Starts selection position updating + + + + + Ends selection position updating + + + + + Exchanges Start and End if End appears before Start + + + + + Exchanges Start and End + + + + + Expands range from first char of Start line to last char of End line + + + + + Get fragment of text around Start place. Returns maximal matched to pattern fragment. + + Allowed chars pattern for fragment + Range of found fragment + + + + Get fragment of text around Start place. Returns maximal matched to given Style. + + Allowed style for fragment + Range of found fragment + + + + Get fragment of text around Start place. Returns maximal mathed to pattern fragment. + + Allowed chars pattern for fragment + Range of found fragment + + + + Is char before range readonly + + + + + + Is char after range readonly + + + + + + Return true if no selected text + + + + + Column selection mode + + + + + Start line and char position + + + + + Finish line and char position + + + + + Text of range + + This property has not 'set' accessor because undo/redo stack works only with + FastColoredTextBox.Selection range. So, if you want to set text, you need to use FastColoredTextBox.Selection + and FastColoredTextBox.InsertText() mehtod. + + + + + Returns first char after Start place + + + + + Returns first char before Start place + + + + + Return minimum of end.X and start.X + + + + + Return maximum of end.X and start.X + + + + + Chars of range (exclude \n) + + + + + Range is readonly? + This property return True if any char of the range contains ReadOnlyStyle. + Set this property to True/False to mark chars of the range as Readonly/Writable. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Returns edited hotkey map + + + + + + Fast colored textbox + + + + + Constructor + + + + + Removes all hints + + + + + Add and shows the hint + + Linked range + Inner control + Scrolls textbox to the hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Add and shows the hint + + Linked range + Inner control + + + + Add and shows simple text hint + + Linked range + Text of simple hint + Scrolls textbox to the hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Add and shows simple text hint + + Linked range + Text of simple hint + + + + Occurs when user click on the hint + + + + + + Occurs when VisibleRange is changed + + + + + Invalidates the entire surface of the control and causes the control to be redrawn. + This method is thread safe and does not require Invoke. + + + + + Returns list of styles of given place + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Navigates forward (by Line.LastVisit property) + + + + + Navigates backward (by Line.LastVisit property) + + + + + Navigates to defined line, without Line.LastVisit reseting + + + + + Add new style + + Layer index of this style + + + + Shows find dialog + + + + + Shows find dialog + + + + + Shows replace dialog + + + + + Shows replace dialog + + + + + Gets length of given line + + Line index + Length of line + + + + Get range of line + + Line index + + + + Copy selected text into Clipboard + + + + + Cut selected text into Clipboard + + + + + Paste text from clipboard into selected position + + + + + Select all chars of text + + + + + Move caret to end of text + + + + + Move caret to first position + + + + + Clear text, styles, history, caches + + + + + Clear buffer of styles + + + + + Clear style of all text + + + + + Clears undo and redo stacks + + + + + Insert text into current selected position + + + + + Insert text into current selected position + + + + + + Insert text into current selection position (with predefined style) + + + + + + Insert text into current selection position (with predefined style) + + + + + Append string to end of the Text + + + + + Append string to end of the Text + + + + + Returns index of the style in Styles + -1 otherwise + + + Index of the style in Styles + + + + Returns StyleIndex mask of given styles + + + StyleIndex mask of given styles + + + + Deletes selected chars + + + + + Deletes current line(s) + + + + + Calculates wordwrap cutoffs + + + + + Scroll control for display defined rectangle + + + + + + Updates scrollbar position after Value changed + + + + + Scroll control for display caret + + + + + Scroll control left + + + + + Scroll control for display selection area + + + + + Scroll control for display given range + + + + + Scroll control for display given range + + + + + Process control keys + + + + + Scrolls to nearest bookmark or to first bookmark + + Current bookmark line index + + + + Scrolls to nearest previous bookmark or to last bookmark + + Current bookmark line index + + + + Bookmarks line + + + + + Unbookmarks current line + + + + + Moves selected lines down + + + + + Moves selected lines up + + + + + Convert selected text to upper case + + + + + Convert selected text to lower case + + + + + Convert selected text to title case + + + + + Insert/remove comment prefix into selected lines + + + + + Insert/remove comment prefix into selected lines + + + + + Process "real" keys (no control) + + + + + Do AutoIndentChars + + + + + Finds given char after current caret position, moves the caret to found pos. + + + + + + Inserts autoindent's spaces in the line + + + + + Returns needed start space count for the line + + + + + Undo last operation + + + + + Redo + + + + + Draws text to given Graphics + + + Start place of drawing text + Size of drawing + + + + Draw control + + + + + Gets the value for the system control panel mouse wheel scroll settings. + The value returns the number of lines that shall be scolled if the user turns the mouse wheet one step. + + + This methods gets the "WheelScrollLines" value our from the registry key "HKEY_CURRENT_USER\Control Panel\Desktop". + If the value of this option is 0, the screen will not scroll when the mouse wheel is turned. + If the value of this option is -1 or is greater than the number of lines visible in the window, + the screen will scroll up or down by one page. + + + Number of lines to scrol l when the mouse wheel is turned + + + + + Gets nearest line and char position from coordinates + + Point + Line and char position + + + + Gets nearest absolute text position for given point + + Point + Position + + + + Fires TextChanging event + + + + + Fires TextChanged event + + + + + Fires TextChanged event + + + + + Fires TextChanged event + + + + + Call this method before multiple text changing + + + + + Call this method after multiple text changing + + + + + Fires TextChanged event + + + + + Clears folding state for range of text + + + + + Fires SelectionChanged event + + + + + Gets absolute text position from line and char position + + Line and char position + Point of char + + + + Gets line and char position from absolute text position + + + + + Gets absolute char position from char position + + + + + Gets point for given line and char position + + Line and char position + Coordiantes + + + + Get range of text + + Absolute start position + Absolute finish position + Range + + + + Get range of text + + Line and char position + Line and char position + Range + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Get text of given line + + Line index + Text + + + + Exapnds folded block + + Start line + + + + Collapse folding blocks using FoldedBlocks dictionary. + + + + + Expand collapsed block + + + + + Expand collapsed block + + Any line inside collapsed block + + + + Collapses all folding blocks + + + + + Exapnds all folded blocks + + + + + + Collapses folding block + + Start folding line + + + + Start foilding marker for the line + + + + + End foilding marker for the line + + + + + Collapse text block + + + + + Insert TAB into front of seletcted lines. + + + + + Remove TAB from front of seletcted lines. + + + + + Remove TAB in front of the caret ot the selected line. + + + + + Insert autoindents into selected lines + + + + + Insert prefix into front of seletcted lines + + + + + Remove prefix from front of selected lines + This method ignores forward spaces of the line + + + + + Begins AutoUndo block. + All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. + + + + + Ends AutoUndo block. + All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. + + + + + Highlights brackets around caret + + + + + Returns range between brackets (or null if not found) + + + + + Selectes next fragment for given regex. + + + + + Prints range of text + + + + + Prints all text + + + + + Prints all text, without any dialog windows + + + + + Open text file + + + + + Open text file (with automatic encoding detector) + + + + + Open file binding mode + + + + + + + Close file binding mode + + + + + Save text to the file + + + + + + + Set VisibleState of line + + + + + Returns VisibleState of the line + + + + + Shows Goto dialog form + + + + + Occurs when undo/redo stack is changed + + + + + Search lines by regex pattern + + + + + Removes given lines + + + + + Activates the scrolling mode (middle click button). + + MouseEventArgs + + + + Deactivates the scrolling mode (middle click button). + + + + + Restore scrolls + + + + + AutoComplete brackets + + + + + Colors of some service visual markers + + + + + Contains UniqueId of start lines of folded blocks + + This dictionary remembers folding state of blocks. + It is needed to restore child folding after user collapsed/expanded top-level folding block. + + + + Strategy of search of brackets to highlighting + + + + + Automatically shifts secondary wordwrap lines on the shift amount of the first line + + + + + Indent of secondary wordwrap lines (in chars) + + + + + MacrosManager records, stores and executes the macroses + + + + + Allows drag and drop + + + + + Collection of Hints. + This is temporary buffer for currently displayed hints. + + You can asynchronously add, remove and clear hints. Appropriate hints will be shown or hidden from the screen. + + + + Delay (ms) of ToolTip + + + + + ToolTip component + + + + + Color of bookmarks + + + + + Bookmarks + + + + + Enables virtual spaces + + + + + Strategy of search of end of folding block + + + + + Indicates if tab characters are accepted as input + + + + + Indicates if return characters are accepted as input + + + + + Shows or hides the caret + + + + + Enables caret blinking + + + + + Color of border of text area + + + + + Type of border of text area + + + + + Background color for current line + + + + + Background color for highlighting of changed lines + + + + + Fore color (default style color) + + + + + Height of char in pixels (includes LineInterval) + + + + + Interval between lines (in pixels) + + + + + Width of char in pixels + + + + + Spaces count for tab + + + + + Text was changed + + + + + Text version + + This counter is incremented each time changes the text + + + + Read only + + + + + Shows line numbers. + + + + + Shows vertical lines between folding start line and folding end line. + + + + + Rectangle where located text + + + + + Color of line numbers. + + + + + Start value of first line number. + + + + + Background color of indent area + + + + + Background color of padding area + + + + + Color of disabled component + + + + + Color of caret + + + + + Wide caret + + + + + Color of service lines (folding lines, borders of blocks etc.) + + + + + Padings of text area + + + + + --Do not use this property-- + + + + + Color of folding area indicator + + + + + Enables folding indicator (left vertical line between folding bounds) + + + + + Left distance to text beginning + + + + + Left padding in pixels + + + + + This property draws vertical line after defined char position. + Set to 0 for disable drawing of vertical line. + + + + + Styles + + + + + Hotkeys. Do not use this property in your code, use HotkeysMapping property. + + + + + Hotkeys mapping + + + + + Default text style + This style is using when no one other TextStyle is not defined in Char.style + + + + + Style for rendering Selection area + + + + + Style for folded block rendering + + + + + Style for brackets highlighting + + + + + Style for alternative brackets highlighting + + + + + Opening bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Closing bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Alternative opening bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Alternative closing bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Comment line prefix. + + + + + This property specifies which part of the text will be highlighted as you type (by built-in highlighter). + + When a user enters text, a component refreshes highlighting (because the text was changed). + This property specifies exactly which section of the text will be re-highlighted. + This can be useful to highlight multi-line comments, for example. + + + + Is keyboard in replace mode (wide caret) ? + + + + + Allows text rendering several styles same time. + + + + + Allows to record macros. + + + + + Allows AutoIndent. Inserts spaces before new line. + + + + + Does autoindenting in existing lines. It works only if AutoIndent is True. + + + + + Minimal delay(ms) for delayed events (except TextChangedDelayed). + + + + + Minimal delay(ms) for TextChangedDelayed event. + + + + + Language for highlighting by built-in highlighter. + + + + + Syntax Highlighter + + + + + XML file with description of syntax highlighting. + This property works only with Language == Language.Custom. + + + + + Position of left highlighted bracket. + + + + + Position of right highlighted bracket. + + + + + Position of left highlighted alternative bracket. + + + + + Position of right highlighted alternative bracket. + + + + + Start line index of current highlighted folding area. Return -1 if start of area is not found. + + + + + End line index of current highlighted folding area. Return -1 if end of area is not found. + + + + + TextSource + + + + + The source of the text. + Allows to get text from other FastColoredTextBox. + + + + + Returns current visible range of text + + + + + Current selection range + + + + + Background color. + It is used if BackBrush is null. + + + + + Background brush. + If Null then BackColor is used. + + + + + Multiline + + + + + WordWrap. + + + + + WordWrap mode. + + + + + If true then line breaks included into the selection will be selected too. + Then line breaks will be shown as selected blank character. + + + + + Do not change this property + + + + + Count of lines + + + + + Gets or sets char and styleId for given place + This property does not fire OnTextChanged event + + + + + Gets Line + + + + + Text of control + + + + + Text lines + + + + + Gets colored text as HTML + + For more flexibility you can use ExportToHTML class also + + + + Gets colored text as RTF + + For more flexibility you can use ExportToRTF class also + + + + Text of current selection + + + + + Start position of selection + + + + + Length of selected text + + + + + Font + + Use only monospaced font + + + + Font + + Use only monospaced font + + + + Indicates that IME is allowed (for CJK language entering) + + + + + Is undo enabled? + + + + + Is redo enabled? + + + + + Range of all text + + + + + Color of selected area + + + + + Reserved space for line number characters. + If smaller than needed (e. g. line count >= 10 and this value set to 1) this value will have no impact. + If you want to reserve space, e. g. for line numbers >= 10 or >= 100 than you can set this value to 2 or 3 or higher. + + + + + Occurs when mouse is moving over text and tooltip is needed + + + + + HintClick event. + It occurs if user click on the hint. + + + + + TextChanged event. + It occurs after insert, delete, clear, undo and redo operations. + + + + + Fake event for correct data binding + + + + + Occurs when user paste text from clipboard + + + + + TextChanging event. + It occurs before insert, delete, clear, undo and redo operations. + + + + + SelectionChanged event. + It occurs after changing of selection. + + + + + VisibleRangeChanged event. + It occurs after changing of visible range. + + + + + TextChangedDelayed event. + It occurs after insert, delete, clear, undo and redo operations. + This event occurs with a delay relative to TextChanged, and fires only once. + + + + + SelectionChangedDelayed event. + It occurs after changing of selection. + This event occurs with a delay relative to SelectionChanged, and fires only once. + + + + + VisibleRangeChangedDelayed event. + It occurs after changing of visible range. + This event occurs with a delay relative to VisibleRangeChanged, and fires only once. + + + + + It occurs when user click on VisualMarker. + + + + + It occurs when visible char is enetering (alphabetic, digit, punctuation, DEL, BACKSPACE) + + Set Handle to True for cancel key + + + + It occurs when visible char is enetered (alphabetic, digit, punctuation, DEL, BACKSPACE) + + + + + It occurs when calculates AutoIndent for new line + + + + + It occurs when line background is painting + + + + + Occurs when line was inserted/added + + + + + Occurs when line was removed + + + + + Occurs when current highlighted folding area is changed. + Current folding area see in StartFoldingLine and EndFoldingLine. + + + + + + Occurs when undo/redo stack is changed + + + + + + Occurs when component was zoomed + + + + + Occurs when user pressed key, that specified as CustomAction + + + + + Occurs when scroolbars are updated + + + + + Occurs when custom wordwrap is needed + + + + + Enables AutoIndentChars mode + + + + + Regex patterns for AutoIndentChars (one regex per line) + + + + + Zooming (in percentages) + + + + + Inserted line index + + + + + Count of inserted lines + + + + + Removed line index + + + + + Count of removed lines + + + + + UniqueIds of removed lines + + + + + TextChanged event argument + + + + + Constructor + + + + + This range contains changed area of text + + + + + Set to true if you want to cancel text inserting + + + + + Word wrapping by control width + + + + + Word wrapping by preferred line width (PreferredLineWidth) + + + + + Char wrapping by control width + + + + + Char wrapping by preferred line width (PreferredLineWidth) + + + + + Custom wrap (by event WordWrapNeeded) + + + + + Title of page. If you want to print Title on the page, insert code &w in Footer or Header. + + + + + Footer of page. + Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). + More detailed see here + + + + + Header of page + Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). + More detailed see here + + + + + Prints line numbers + + + + + Additional spaces count for this line, relative to previous line + + + + + Additional spaces count for next line, relative to previous line + + + + + Absolute indentation of current line. You can change this property if you want to set absolute indentation. + + + + + Type of highlighting + + + + + Highlight only changed range of text. Highest performance. + + + + + Highlight visible range of text. Middle performance. + + + + + Highlight all (visible and invisible) text. Lowest performance. + + + + + Strategy of search of end of folding block + + + + + Strategy of search of brackets to highlighting + + + + + ToolTipNeeded event args + + + + + HintClick event args + + + + + CustomAction event args + + + + + Style index mask (16 styles) + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Shows document map of FCTB + + + + + Scale + + + + + Scrollbar visibility + + + + + Base class for bookmark collection + + + + + Collection of bookmarks + + + + + Removes bookmark by line index + + + + + Returns Bookmark by index. + + + + + Bookmark of FastColoredTextbox + + + + + Scroll textbox to the bookmark + + + + + Name of bookmark + + + + + Line index + + + + + Color of bookmark sign + + + + + Line index and char index + + + + + Line of text + + + + + Clears style of chars, delete folding markers + + + + + Clears folding markers + + + + + Text of line was changed + + + + + Time of last visit of caret in this line + + This property can be used for forward/backward navigating + + + + Background brush. + + + + + Unique ID + + + + + Count of needed start spaces for AutoIndent + + + + + Text of the line + + + + + Count of start spaces + + + + + Chars count + + + + + Visible state + + + + + Gets index of wordwrap string for given char position + + + + + Positions for wordwrap cutoffs + + + + + Count of wordwrap string count for this line + + + + + Limited stack + + + + + Constructor + + Maximum length of stack + + + + Pop item + + + + + Peek item + + + + + Push item + + + + + Clear stack + + + + + Max stack length + + + + + Current length of stack + + + + + Char and style + + + + + Unicode character + + + + + Style bit mask + + Bit 1 in position n means that this char will rendering by FastColoredTextBox.Styles[n] + + + + Insert single char + + This operation includes also insertion of new line and removing char by backspace + + + + Constructor + + Underlaying textbox + Inserting char + + + + Undo operation + + + + + Execute operation + + + + + Merge lines i and i+1 + + + + + Insert text + + + + + Constructor + + Underlaying textbox + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Insert text into given ranges + + + + + Constructor + + Underlaying textbox + List of ranges for replace + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Clear selected text + + + + + Construstor + + Underlaying textbox + + + + Undo operation + + + + + Execute operation + + + + + Replaces text + + + + + Constructor + + Underlaying textsource + List of ranges for replace + + + + Undo operation + + + + + Execute operation + + + + + Removes lines + + + + + Constructor + + Underlaying textbox + List of ranges for replace + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Wrapper for multirange commands + + + + + Remembers current selection and restore it after Undo + + + + + Exports colored text as RTF + + At this time only TextStyle renderer is supported. Other styles is not exported. + + + + Includes line numbers + + + + + Use original font + + + + + Dictionary of shortcuts for FCTB + + + + + Actions for shortcuts + + + + + Collection of Hints. + This is temporary buffer for currently displayed hints. + + + + + Clears all displayed hints + + + + + Add and shows the hint + + + + + + Is collection contains the hint? + + + + + Count of hints + + + + + Hint of FastColoredTextbox + + + + + Scroll textbox to the hint + + + + + Creates Hint + + Linked range + Text for simple hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Creates Hint + + Linked range + Text for simple hint + + + + Creates Hint + + Linked range + Inner control + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Creates Hint + + Linked range + Inner control + + + + Text of simple hint + + + + + Linked range + + + + + Backcolor + + + + + Second backcolor + + + + + Border color + + + + + Fore color + + + + + Text alignment + + + + + Font + + + + + Occurs when user click on simple hint + + + + + Inner control + + + + + Docking (allows None and Fill only) + + + + + Width of hint (if Dock is None) + + + + + Height of hint + + + + + Host panel + + + + + Tag + + + + + Cursor + + + + + Inlining. If True then hint will moves apart text. + + + + + Exports colored text as HTML + + At this time only TextStyle renderer is supported. Other styles is not exported. + + + + Use nbsp; instead space + + + + + Use nbsp; instead space in beginning of line + + + + + Use original font + + + + + Use style tag instead style attribute + + + + + Use 'br' tag instead of '\n' + + + + + Includes line numbers + + + + diff --git a/MSGer.tk/bin/Debug/Handwriting program.dll b/MSGer.tk/bin/Debug/Handwriting program.dll index d949d4e..7a3f8fa 100644 Binary files a/MSGer.tk/bin/Debug/Handwriting program.dll and b/MSGer.tk/bin/Debug/Handwriting program.dll differ diff --git a/MSGer.tk/bin/Debug/Handwriting program.pdb b/MSGer.tk/bin/Debug/Handwriting program.pdb index b9cda3d..4721f6e 100644 Binary files a/MSGer.tk/bin/Debug/Handwriting program.pdb and b/MSGer.tk/bin/Debug/Handwriting program.pdb differ diff --git a/MSGer.tk/bin/Debug/MSGer.tk.exe b/MSGer.tk/bin/Debug/MSGer.tk.exe index 0037761..76db007 100644 Binary files a/MSGer.tk/bin/Debug/MSGer.tk.exe and b/MSGer.tk/bin/Debug/MSGer.tk.exe differ diff --git a/MSGer.tk/bin/Debug/MSGer.tk.pdb b/MSGer.tk/bin/Debug/MSGer.tk.pdb index d83a0a7..056a71b 100644 Binary files a/MSGer.tk/bin/Debug/MSGer.tk.pdb and b/MSGer.tk/bin/Debug/MSGer.tk.pdb differ diff --git a/MSGer.tk/bin/Debug/RichListView.dll b/MSGer.tk/bin/Debug/RichListView.dll index d3b744b..1abd07d 100644 Binary files a/MSGer.tk/bin/Debug/RichListView.dll and b/MSGer.tk/bin/Debug/RichListView.dll differ diff --git a/MSGer.tk/bin/Debug/RichListView.pdb b/MSGer.tk/bin/Debug/RichListView.pdb index 6e89f91..b66b997 100644 Binary files a/MSGer.tk/bin/Debug/RichListView.pdb and b/MSGer.tk/bin/Debug/RichListView.pdb differ diff --git a/MSGer.tk/bin/Debug/SVN/.justforgithub b/MSGer.tk/bin/Debug/SVN/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/Updater.exe b/MSGer.tk/bin/Debug/Updater.exe index cbf5225..ca8bd28 100644 Binary files a/MSGer.tk/bin/Debug/Updater.exe and b/MSGer.tk/bin/Debug/Updater.exe differ diff --git a/MSGer.tk/bin/Debug/Updater.pdb b/MSGer.tk/bin/Debug/Updater.pdb index 34f5b8e..2fa5738 100644 Binary files a/MSGer.tk/bin/Debug/Updater.pdb and b/MSGer.tk/bin/Debug/Updater.pdb differ diff --git a/MSGer.tk/bin/Debug/language/.justforgithub b/MSGer.tk/bin/Debug/language/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/language/en.txt b/MSGer.tk/bin/Debug/language/en.txt new file mode 100644 index 0000000..168d2d6 --- /dev/null +++ b/MSGer.tk/bin/Debug/language/en.txt @@ -0,0 +1,139 @@ +menu_file=File +menu_file_logout=Logout +menu_file_loginnewuser=Login new user... +menu_file_status=Status +menu_file_status_online=Online +menu_file_status_busy=Busy +menu_file_status_away=Away +menu_file_status_hidden=Hidden +menu_file_sendfile=Send file... +menu_file_openreceivedfiles=Open received files... +menu_file_openrecentmsgs=Open recent messages... +menu_file_close,close=Close +menu_file_exit=Exit +menu_contacts=Contacts +menu_contacts_add=Add contact... +menu_contacts_edit=Edit contact... +menu_contacts_remove=Remove contact... +menu_contacts_invite=Invite contact... +menu_contacts_makegroup=Make group... +menu_contacts_makecategory=Make category... +menu_contacts_editcategory=Edit category... +menu_contacts_removecategory=Remove category... +menu_operations=Operations +sendmsg=Send message +menu_operations_sendother=Send other +menu_operations_sendmail=Send E-mail +menu_operations_callcontact=Call contact... +menu_operations_videocall=Start video call... +menu_operations_showonlinefiles=Show online files +menu_operations_playgame=Play game... +menu_operations_askforhelp=Ask for help... +menu_tools=Tools +menu_tools_alwaysontop=Always on top +menu_tools_changeimage=Change image... +menu_tools_changebackground=Change background... +menu_tools_voicevideosettings=Voice and video settings +menu_tools_settings=Settings +menu_help=Help +menu_help_contents=Contents +menu_help_status=Service state +menu_help_privacypolicy=Privacy policy +menu_help_termsofuse=Terms of use +menu_help_report=Report abuse +menu_help_improveprogram=Help improving the program +menu_help_about=About +searchbar=Search contacts... +contact_sendemail=Send E-mail +contact_copyemail=Copy E-mail address +contact_info=Information +contact_block=Block contact +contact_remove=Remove contact +contact_editname=Edit name +contact_eventnotifications=Event notifications +contact_openchatlog=Open chat log +iconmenu_show=Show +login=Login +button_cancel=Cancel +password=Password +registration=Registration +forgotpassword=Forgot password +login_desc1=You can use your username or user ID instead of your E-mail address. +login_desc2=If you can't log in, restart the program. If it doesn't help and the problem is not with your username/password, please report the problem. +error=Error +connecterror=Connecting to server failed. +login_badnamepass=Incorrect username or password. +reg_code=Code +username=Username +reg_emptyfield=Fill in every field. +reg_codeerr=The given code is invalid or already used. +reg_nameerr=The username is already taken. +reg_namelen=Incorrect username length. (At least 4 characters) +reg_passlen=Incorrect password length. (At least 6 characters) +reg_email=E-mail address is not specified or invalid. +reg_success=Registration succesful. +addcontact=Add contact +addcontact_nameemail=Name/E-mail/Username +addcontact_search=Search +chat_nowindow=The partner creating the window is not found. +chat_title=Chat +chat_showicons=Show emoticons +offline=Offline +said=said +about=About {0} +about_version=Version: {0} +about_programmer=Programmer: +about_specialthanks=Special thanks: +about_specthanks1=for answering my questions/for testing +about_specthanks2=for translating the program +about_specthanks3=for making GlacialList +about_specthanks4=for textboxes that you can insert images into +settings=Settings +settings_personal=Personal +settings_layout=Layout +settings_chatwindow=Show conversations in different window(s) +settings_chatwindowtabs=Organise conversations with tabs +settings_packs=Packs +settings_network=Network +outofdate=A new version is available. Would you like to install it? +outofdate_caption=New verison +error_no_network=No internet connection! +error_network_nointernet=Do you have an active internet connection? +error_unknown1=Unknown error. Send the error to me and maybe I find a solution. +error_unknown2=Unknown error. If you send it to me maybe I find a solution but for sure. +error_servererror=Server error. +fatalerror=Fatal error +name=Name +message=Message +language=Language +userid=User ID +networking_alone=No other users available. You can only use offline functions. +beforelogin_translatemainf=Translating texts in the main window... +beforelogin_checkforupdates=Checking updates... +beforelogin_loginform=Showing login window... +stats_servers=Available servers +stats_onlineservers=Connected servers +stats_mainserver=Main server +stats_nonetwork=No network +stats_retrying=Reconnecting... +stats_connected=Connected +updater=Downloading updates... +sendbtn_send=Send +scriptnotfound=The specified script is not found. +scripterror=An error occured while loading a script. Please open settings. +scriptunloadrequired=The selected script is currently loaded. Please unload it in order to edit it. +scripter=Scripter +scripter_new=New +scripter_open=Open +scripter_save=Save +scripter_exit=Exit +receivedfiles=Received files +restartbutton=Restart +selectimage=Select image +modify=Modify +emoticons=Emoticons +add=Add +remove=Remove +text=Text +areyousure=Are you sure? +currentlang=English diff --git a/MSGer.tk/bin/Debug/language/hu.txt b/MSGer.tk/bin/Debug/language/hu.txt new file mode 100644 index 0000000..b4acdf7 --- /dev/null +++ b/MSGer.tk/bin/Debug/language/hu.txt @@ -0,0 +1,139 @@ +menu_file=Fájl +menu_file_logout=Kijelentkezés +menu_file_loginnewuser=Újabb felhasználó bejelentkeztetése... +menu_file_status=Állapot +menu_file_status_online=Elérhető +menu_file_status_busy=Elfoglalt +menu_file_status_away=Nincs a gépnél +menu_file_status_hidden=Rejtve kapcsolódik +menu_file_sendfile=Fálj küldése... +menu_file_openreceivedfiles=Beérkezett fájlok mappájának megnyitása... +menu_file_openrecentmsgs=Üzenetek előzményeinek megtekintése... +menu_file_close,close=Bezárás +menu_file_exit=Kilépés +menu_contacts=Ismerősök +menu_contacts_add=Ismerős felvétele... +menu_contacts_edit=Ismerős szerkesztése... +menu_contacts_remove=Ismerős törlése... +menu_contacts_invite=Ismerős meghívása... +menu_contacts_makegroup=Csoport létrehozása... +menu_contacts_makecategory=Kategória létrehozása... +menu_contacts_editcategory=Kategória szerkesztése... +menu_contacts_removecategory=Kategória törlése... +menu_operations=Műveletek +sendmsg=Üzenetküldés +menu_operations_sendother=Egyéb küldése +menu_operations_sendmail=E-mail küldése +menu_operations_callcontact=Ismerős felhívása... +menu_operations_videocall=Videohívás indítása... +menu_operations_showonlinefiles=Online fájlok megtekintése +menu_operations_playgame=Játék... +menu_operations_askforhelp=Távsegítség kérése... +menu_tools=Eszközök +menu_tools_alwaysontop=Mindig legfelül +emoticons=Hangulatjelek +menu_tools_changeimage=Kép megváltoztatása... +menu_tools_changebackground=Háttér megváltoztatása... +menu_tools_voicevideosettings=Hang- és videobeállítások... +menu_tools_settings=Beállítások +menu_help=Súgó +menu_help_contents=Tartalom +menu_help_status=A szolgáltatás állapota +menu_help_privacypolicy=Adatvédelmi nyilatkozat +menu_help_termsofuse=Felhasználási feltételek +menu_help_report=Visszaélés bejelentése +menu_help_improveprogram=Segíts a program tökéletesítésében +menu_help_about=Névjegy +searchbar=Ismerősök keresése... +contact_sendemail=E-mail küldése +contact_copyemail=E-mail cím másolása +contact_info=Információ +contact_block=Ismerős letiltása +contact_remove=Ismerős törlése +contact_editname=Becenév szerkesztése +contact_eventnotifications=Eseményértesítések +contact_openchatlog=Beszélgetésnapló megnyitása +iconmenu_show=Megjelenítés +login=Bejelentkezés +button_cancel=Mégse +password=Jelszó +registration=Regisztráció +forgotpassword=Elfelejtett jelszó +login_desc1=Az e-mail helyett használhatod a felhasználóneved is vagy a felhasználód azonosítószámát. +login_desc2=Ha nem tudsz bejelentkezni, próbáld meg újrainditani a programot. Ha az sem segít, és nem a felhasználóneveddel/jelszavaddal van a probléma, akkor jelentsd a problémát. +error=Hiba +connecterror=Nem sikerült csatlakozni a szerverhez. Lehet, hogy nincs internet, de nem biztos. +login_badnamepass=Helytelen felhasználónév, vagy jelszó. +reg_code=Kód +username=Felhasználónév +reg_emptyfield=Minden mezőt tölts ki. +reg_codeerr=A megadott kód nem létezik vagy már felhasználták. +reg_nameerr=A felhasználónév már foglalt. +reg_namelen=A felhasználónév hossza nem megfelelő. (Min. 4 karakter) +reg_passlen=A jelszó hossza nem megfelelő. (Min. 6 karakter) +reg_email=Az E-mail cím nincs megadva vagy helytelen. +reg_success=Sikeres regisztráció. +addcontact=Ismerős felvétele +addcontact_nameemail=Név/E-mail/Felhasználónév +addcontact_search=Keresés +add=Felvétel +chat_nowindow=Az ablakot létrehozó partner nem található. +chat_title=Beszélgetés +chat_showicons=Hangulatjelek megjelenítése +offline=Nem elérhető +said=üzenete +about=A {0} programról +about_version=Verzió: {0} +about_programmer=Programozó: +about_specialthanks=Külön köszönet: +about_specthanks1=a kérdéseim megválaszolásáért/tesztelésért +about_specthanks2=a program lefordításáért +about_specthanks3=a GlacialList elkészítéséért +about_specthanks4=a szövegdobozokba illeszthető képekért +settings=Beállítások +settings_personal=Személyes +settings_layout=Kinézet +settings_chatwindow=A beszélgetések jelenjenek meg külön ablak(ok)ban +settings_chatwindowtabs=A beszélgetések fülekbe rendezése +settings_packs=Csomagok +settings_network=Hálózat +outofdate=Elérhető egy újabb verzió. Szeretnéd telepíteni? +outofdate_caption=Új verzió +error_no_network=Nincs internetkapcsolat! +error_network_nointernet=Van aktív internetkapcsolatod? +error_unknown1=Ismeretlen hiba. Küldd el a hibát, és talán találok rá egy megoldást. +error_unknown2=Ismeretlen hiba. Ha elküldöd, talán találok megoldást, de nem biztos. +error_servererror=Szerverhiba +fatalerror=Fatális hiba +name=Név +message=Üzenet +language=Nyelv +userid=Felh. ID +networking_alone=Nincs más elérhető felhasználó. Jelenleg csak az offline funkciókat használhatod. +beforelogin_translatemainf=Szövegek lefordítása a fő ablakon... +beforelogin_checkforupdates=Frissítések ellenőrzése... +beforelogin_loginform=Bejelentkezőablak megjelenítése... +stats_servers=Elérhető szerverek +stats_onlineservers=Csatlakozott szerverek +stats_mainserver=Fő szerver +stats_nonetwork=Nincs hálózat +stats_retrying=Újracsatlakozás... +stats_connected=Csatlakozva +updater=Frissítések letöltése... +sendbtn_send=Küldés +scriptnotfound=A megadott szkript nem található.. +scripterror=Egy hiba történt egy szkript betöltésekor. Nyisd meg a beállításokat. +scriptunloadrequired=A kiválasztott szkript jelenleg be van töltve. Kapcsold ki, hogy szerkeszthesd. +scripter=Szkriptíró +scripter_new=Új +scripter_open=Megnyitás +scripter_save=Mentés +scripter_exit=Kilépés +receivedfiles=Beérkezett fájlok +restartbutton=Újraindítás +selectimage=Kép kiválasztása +modify=Módosítás +text=Szöveg +areyousure=Biztos vagy benne? +remove=Eltávolítás +currentlang=Magyar diff --git a/MSGer.tk/bin/Debug/languages/.justforgithub b/MSGer.tk/bin/Debug/languages/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/logs/.justforgithub b/MSGer.tk/bin/Debug/logs/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/pictures/.justforgithub b/MSGer.tk/bin/Debug/pictures/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/pictures/1.png b/MSGer.tk/bin/Debug/pictures/1.png new file mode 100644 index 0000000..00b1f5a Binary files /dev/null and b/MSGer.tk/bin/Debug/pictures/1.png differ diff --git a/MSGer.tk/bin/Debug/program.db b/MSGer.tk/bin/Debug/program.db index d9a06f4..6bcb266 100644 Binary files a/MSGer.tk/bin/Debug/program.db and b/MSGer.tk/bin/Debug/program.db differ diff --git a/MSGer.tk/bin/Debug/scriptloader/.justforgithub b/MSGer.tk/bin/Debug/scriptloader/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/textformat/.justforgithub b/MSGer.tk/bin/Debug/textformat/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Debug/textformat/New pack.npack b/MSGer.tk/bin/Debug/textformat/New pack.npack new file mode 100644 index 0000000..d190a29 Binary files /dev/null and b/MSGer.tk/bin/Debug/textformat/New pack.npack differ diff --git a/MSGer.tk/bin/Debug/theme/.justforgithub b/MSGer.tk/bin/Debug/theme/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/.justforgithub b/MSGer.tk/bin/Release/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/Handwriting program.dll b/MSGer.tk/bin/Release/Handwriting program.dll new file mode 100644 index 0000000..496f949 Binary files /dev/null and b/MSGer.tk/bin/Release/Handwriting program.dll differ diff --git a/MSGer.tk/bin/Release/Handwriting program.pdb b/MSGer.tk/bin/Release/Handwriting program.pdb new file mode 100644 index 0000000..2a6c2d4 Binary files /dev/null and b/MSGer.tk/bin/Release/Handwriting program.pdb differ diff --git a/MSGer.tk/bin/Release/MSGer.tk.exe b/MSGer.tk/bin/Release/MSGer.tk.exe index acc488b..2677fe6 100644 Binary files a/MSGer.tk/bin/Release/MSGer.tk.exe and b/MSGer.tk/bin/Release/MSGer.tk.exe differ diff --git a/MSGer.tk/bin/Release/MSGer.tk.pdb b/MSGer.tk/bin/Release/MSGer.tk.pdb index 7ba9397..4fbf78e 100644 Binary files a/MSGer.tk/bin/Release/MSGer.tk.pdb and b/MSGer.tk/bin/Release/MSGer.tk.pdb differ diff --git a/MSGer.tk/bin/Release/MSGer.tk.vshost.exe b/MSGer.tk/bin/Release/MSGer.tk.vshost.exe index c0dfecc..666c0af 100644 Binary files a/MSGer.tk/bin/Release/MSGer.tk.vshost.exe and b/MSGer.tk/bin/Release/MSGer.tk.vshost.exe differ diff --git a/MSGer.tk/bin/Release/RichListView.dll b/MSGer.tk/bin/Release/RichListView.dll index d80b490..524a6c4 100644 Binary files a/MSGer.tk/bin/Release/RichListView.dll and b/MSGer.tk/bin/Release/RichListView.dll differ diff --git a/MSGer.tk/bin/Release/RichListView.pdb b/MSGer.tk/bin/Release/RichListView.pdb index 08d5ff2..9c0dedc 100644 Binary files a/MSGer.tk/bin/Release/RichListView.pdb and b/MSGer.tk/bin/Release/RichListView.pdb differ diff --git a/MSGer.tk/bin/Release/SVN/.justforgithub b/MSGer.tk/bin/Release/SVN/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/SVN/SVN Cheat Sheet.htm b/MSGer.tk/bin/Release/SVN/SVN Cheat Sheet.htm new file mode 100644 index 0000000..2134755 --- /dev/null +++ b/MSGer.tk/bin/Release/SVN/SVN Cheat Sheet.htm @@ -0,0 +1,101 @@ + + + + + +SVN Cheat Sheet + + + + + + + + +
+
+Todo..
+
+
+ +
+
+Cheat Sheet
+
+
+ + + + diff --git a/MSGer.tk/bin/Release/SVN/SVN Readme.htm b/MSGer.tk/bin/Release/SVN/SVN Readme.htm new file mode 100644 index 0000000..d45f699 --- /dev/null +++ b/MSGer.tk/bin/Release/SVN/SVN Readme.htm @@ -0,0 +1,105 @@ + + + + + +SVN Readme + + + + + + + + +
+
+Windows binaries from http://alagazam.net/
+Subversion build 1.6.15 : Zip file (see website for latest versions)
+
+Also available on authors sourceforge site.
+http://sourceforge.net/projects/win32svn/files/
+
+
+ +
+
+Subversion Portable Readme
+
+
+ + + + diff --git a/MSGer.tk/bin/Release/SVN/SVN Reference.htm b/MSGer.tk/bin/Release/SVN/SVN Reference.htm new file mode 100644 index 0000000..862f04e --- /dev/null +++ b/MSGer.tk/bin/Release/SVN/SVN Reference.htm @@ -0,0 +1,106 @@ + + + + + +SVN reference + + + + + + + + +
+
+Version Control with Subversion
+http://svnbook.red-bean.com/en/1.5/index.html
+
+Article - Dump a SVN repository from a URL
+http://pogopixels.com/blog/dumping-a-svn-repository-from-a-remote-url/
+
+
+
+ +
+
+Subversion References
+
+
+ + + + diff --git a/MSGer.tk/bin/Release/SVN/intl3_svn.dll b/MSGer.tk/bin/Release/SVN/intl3_svn.dll new file mode 100644 index 0000000..850645a Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/intl3_svn.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libapr-1.dll b/MSGer.tk/bin/Release/SVN/libapr-1.dll new file mode 100644 index 0000000..4942e33 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libapr-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libapriconv-1.dll b/MSGer.tk/bin/Release/SVN/libapriconv-1.dll new file mode 100644 index 0000000..b14001b Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libapriconv-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libaprutil-1.dll b/MSGer.tk/bin/Release/SVN/libaprutil-1.dll new file mode 100644 index 0000000..e50dbb4 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libaprutil-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libdb44.dll b/MSGer.tk/bin/Release/SVN/libdb44.dll new file mode 100644 index 0000000..347a942 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libdb44.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libeay32.dll b/MSGer.tk/bin/Release/SVN/libeay32.dll new file mode 100644 index 0000000..8cdeaed Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libeay32.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsasl.dll b/MSGer.tk/bin/Release/SVN/libsasl.dll new file mode 100644 index 0000000..770c06e Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsasl.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_client-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_client-1.dll new file mode 100644 index 0000000..0dc8be9 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_client-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_delta-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_delta-1.dll new file mode 100644 index 0000000..69e6eac Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_delta-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_diff-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_diff-1.dll new file mode 100644 index 0000000..97132ae Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_diff-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_fs-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_fs-1.dll new file mode 100644 index 0000000..1b3b2a8 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_fs-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_ra-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_ra-1.dll new file mode 100644 index 0000000..a5484ec Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_ra-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_repos-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_repos-1.dll new file mode 100644 index 0000000..c4bd5a7 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_repos-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_subr-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_subr-1.dll new file mode 100644 index 0000000..1d1544f Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_subr-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/libsvn_wc-1.dll b/MSGer.tk/bin/Release/SVN/libsvn_wc-1.dll new file mode 100644 index 0000000..e25391a Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/libsvn_wc-1.dll differ diff --git a/MSGer.tk/bin/Release/SVN/openssl.exe b/MSGer.tk/bin/Release/SVN/openssl.exe new file mode 100644 index 0000000..61f5e53 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/openssl.exe differ diff --git a/MSGer.tk/bin/Release/SVN/pluginviewer.exe b/MSGer.tk/bin/Release/SVN/pluginviewer.exe new file mode 100644 index 0000000..56f69a1 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/pluginviewer.exe differ diff --git a/MSGer.tk/bin/Release/SVN/saslANONYMOUS.dll b/MSGer.tk/bin/Release/SVN/saslANONYMOUS.dll new file mode 100644 index 0000000..db01077 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslANONYMOUS.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslCRAMMD5.dll b/MSGer.tk/bin/Release/SVN/saslCRAMMD5.dll new file mode 100644 index 0000000..86af07b Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslCRAMMD5.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslDIGESTMD5.dll b/MSGer.tk/bin/Release/SVN/saslDIGESTMD5.dll new file mode 100644 index 0000000..fc97449 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslDIGESTMD5.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslLOGIN.dll b/MSGer.tk/bin/Release/SVN/saslLOGIN.dll new file mode 100644 index 0000000..48e0862 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslLOGIN.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslNTLM.dll b/MSGer.tk/bin/Release/SVN/saslNTLM.dll new file mode 100644 index 0000000..1c6bd0d Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslNTLM.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslPLAIN.dll b/MSGer.tk/bin/Release/SVN/saslPLAIN.dll new file mode 100644 index 0000000..acf7c2c Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslPLAIN.dll differ diff --git a/MSGer.tk/bin/Release/SVN/saslSASLDB.dll b/MSGer.tk/bin/Release/SVN/saslSASLDB.dll new file mode 100644 index 0000000..69b5ac4 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslSASLDB.dll differ diff --git a/MSGer.tk/bin/Release/SVN/sasldblistusers2.exe b/MSGer.tk/bin/Release/SVN/sasldblistusers2.exe new file mode 100644 index 0000000..f997c6c Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/sasldblistusers2.exe differ diff --git a/MSGer.tk/bin/Release/SVN/saslpasswd2.exe b/MSGer.tk/bin/Release/SVN/saslpasswd2.exe new file mode 100644 index 0000000..544e037 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/saslpasswd2.exe differ diff --git a/MSGer.tk/bin/Release/SVN/ssleay32.dll b/MSGer.tk/bin/Release/SVN/ssleay32.dll new file mode 100644 index 0000000..ee1b39f Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/ssleay32.dll differ diff --git a/MSGer.tk/bin/Release/SVN/svn-populate-node-origins-index.exe b/MSGer.tk/bin/Release/SVN/svn-populate-node-origins-index.exe new file mode 100644 index 0000000..18a846f Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svn-populate-node-origins-index.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svn-push.exe b/MSGer.tk/bin/Release/SVN/svn-push.exe new file mode 100644 index 0000000..2ce8b87 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svn-push.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svn.exe b/MSGer.tk/bin/Release/SVN/svn.exe new file mode 100644 index 0000000..3ea00ea Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svn.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnadmin.exe b/MSGer.tk/bin/Release/SVN/svnadmin.exe new file mode 100644 index 0000000..647ccd8 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnadmin.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnauthz-validate.exe b/MSGer.tk/bin/Release/SVN/svnauthz-validate.exe new file mode 100644 index 0000000..2c75e15 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnauthz-validate.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svndumpfilter.exe b/MSGer.tk/bin/Release/SVN/svndumpfilter.exe new file mode 100644 index 0000000..e309a27 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svndumpfilter.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnlook.exe b/MSGer.tk/bin/Release/SVN/svnlook.exe new file mode 100644 index 0000000..d8c5d7f Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnlook.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnmucc.exe b/MSGer.tk/bin/Release/SVN/svnmucc.exe new file mode 100644 index 0000000..f144b3d Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnmucc.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnserve.exe b/MSGer.tk/bin/Release/SVN/svnserve.exe new file mode 100644 index 0000000..bf75d49 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnserve.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnsync.exe b/MSGer.tk/bin/Release/SVN/svnsync.exe new file mode 100644 index 0000000..b28b0bc Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnsync.exe differ diff --git a/MSGer.tk/bin/Release/SVN/svnversion.exe b/MSGer.tk/bin/Release/SVN/svnversion.exe new file mode 100644 index 0000000..03ec595 Binary files /dev/null and b/MSGer.tk/bin/Release/SVN/svnversion.exe differ diff --git a/MSGer.tk/bin/Release/Updater.exe b/MSGer.tk/bin/Release/Updater.exe new file mode 100644 index 0000000..0c92ab6 Binary files /dev/null and b/MSGer.tk/bin/Release/Updater.exe differ diff --git a/MSGer.tk/bin/Release/Updater.exe.config b/MSGer.tk/bin/Release/Updater.exe.config new file mode 100644 index 0000000..fad249e --- /dev/null +++ b/MSGer.tk/bin/Release/Updater.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MSGer.tk/bin/Release/Updater.pdb b/MSGer.tk/bin/Release/Updater.pdb new file mode 100644 index 0000000..1302736 Binary files /dev/null and b/MSGer.tk/bin/Release/Updater.pdb differ diff --git a/MSGer.tk/bin/Release/language/.justforgithub b/MSGer.tk/bin/Release/language/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/languages/.justforgithub b/MSGer.tk/bin/Release/languages/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/program.db b/MSGer.tk/bin/Release/program.db new file mode 100644 index 0000000..a83d18a Binary files /dev/null and b/MSGer.tk/bin/Release/program.db differ diff --git a/MSGer.tk/bin/Release/scriptloader/.justforgithub b/MSGer.tk/bin/Release/scriptloader/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/textformat/.justforgithub b/MSGer.tk/bin/Release/textformat/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/bin/Release/theme/.justforgithub b/MSGer.tk/bin/Release/theme/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/.justforgithub b/MSGer.tk/obj/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/Debug/.justforgithub b/MSGer.tk/obj/Debug/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 61ddb21..e43e088 100644 Binary files a/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 8caedef..230cf7f 100644 Binary files a/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/MSGer.tk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/MSGer.tk/obj/Debug/Interop.NATUPNPLib.dll b/MSGer.tk/obj/Debug/Interop.NATUPNPLib.dll index 4626e36..d838ca6 100644 Binary files a/MSGer.tk/obj/Debug/Interop.NATUPNPLib.dll and b/MSGer.tk/obj/Debug/Interop.NATUPNPLib.dll differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.ChatPanel.resources b/MSGer.tk/obj/Debug/MSGer.tk.ChatPanel.resources index 6c05a97..6a572f6 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.ChatPanel.resources and b/MSGer.tk/obj/Debug/MSGer.tk.ChatPanel.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.Emoticons.resources b/MSGer.tk/obj/Debug/MSGer.tk.Emoticons.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.Emoticons.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.ErrorHandler.resources b/MSGer.tk/obj/Debug/MSGer.tk.ErrorHandler.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.ErrorHandler.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.FloatingChatIcon.resources b/MSGer.tk/obj/Debug/MSGer.tk.FloatingChatIcon.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.FloatingChatIcon.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.Properties.Resources.resources b/MSGer.tk/obj/Debug/MSGer.tk.Properties.Resources.resources index af48a80..24247ba 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.Properties.Resources.resources and b/MSGer.tk/obj/Debug/MSGer.tk.Properties.Resources.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.ScripterWindow.resources b/MSGer.tk/obj/Debug/MSGer.tk.ScripterWindow.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.ScripterWindow.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.SelectShownImage.resources b/MSGer.tk/obj/Debug/MSGer.tk.SelectShownImage.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.SelectShownImage.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelLayout.resources b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelLayout.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelLayout.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelNetwork.resources b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelNetwork.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelNetwork.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPacks.resources b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPacks.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPacks.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPersonal.resources b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPersonal.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.SettingsPanelPersonal.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.ThemeDesigner.resources b/MSGer.tk/obj/Debug/MSGer.tk.ThemeDesigner.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Debug/MSGer.tk.ThemeDesigner.resources differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.csproj.FileListAbsolute.txt b/MSGer.tk/obj/Debug/MSGer.tk.csproj.FileListAbsolute.txt index f52c08d..863d681 100644 --- a/MSGer.tk/obj/Debug/MSGer.tk.csproj.FileListAbsolute.txt +++ b/MSGer.tk/obj/Debug/MSGer.tk.csproj.FileListAbsolute.txt @@ -76,3 +76,15 @@ D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Debug\Handwrit D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.ThemedForms.resources D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\Interop.NATUPNPLib.dll D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.csproj.ResolveComReference.cache +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.ScripterWindow.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.FloatingChatIcon.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.SettingsPanelPersonal.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.SettingsPanelLayout.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.SettingsPanelPacks.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.ThemeDesigner.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.SettingsPanelNetwork.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.ErrorHandler.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.SelectShownImage.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Debug\MSGer.tk.Emoticons.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Debug\FastColoredTextBox.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Debug\FastColoredTextBox.xml diff --git a/MSGer.tk/obj/Debug/MSGer.tk.csproj.GenerateResource.Cache b/MSGer.tk/obj/Debug/MSGer.tk.csproj.GenerateResource.Cache index 3764689..8234e2d 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.csproj.GenerateResource.Cache and b/MSGer.tk/obj/Debug/MSGer.tk.csproj.GenerateResource.Cache differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.csprojResolveAssemblyReference.cache b/MSGer.tk/obj/Debug/MSGer.tk.csprojResolveAssemblyReference.cache index 17eb322..03dd0dd 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.csprojResolveAssemblyReference.cache and b/MSGer.tk/obj/Debug/MSGer.tk.csprojResolveAssemblyReference.cache differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.exe b/MSGer.tk/obj/Debug/MSGer.tk.exe index 0037761..76db007 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.exe and b/MSGer.tk/obj/Debug/MSGer.tk.exe differ diff --git a/MSGer.tk/obj/Debug/MSGer.tk.pdb b/MSGer.tk/obj/Debug/MSGer.tk.pdb index d83a0a7..056a71b 100644 Binary files a/MSGer.tk/obj/Debug/MSGer.tk.pdb and b/MSGer.tk/obj/Debug/MSGer.tk.pdb differ diff --git a/MSGer.tk/obj/Debug/TempPE/.justforgithub b/MSGer.tk/obj/Debug/TempPE/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/MSGer.tk/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll index 61bf257..311f0c4 100644 Binary files a/MSGer.tk/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll and b/MSGer.tk/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/MSGer.tk/obj/Release/.justforgithub b/MSGer.tk/obj/Release/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferences.cache b/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferences.cache index 1f92c39..6227529 100644 Binary files a/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index ee38181..c732e6f 100644 Binary files a/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/MSGer.tk/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/MSGer.tk/obj/Release/Interop.NATUPNPLib.dll b/MSGer.tk/obj/Release/Interop.NATUPNPLib.dll new file mode 100644 index 0000000..64dd021 Binary files /dev/null and b/MSGer.tk/obj/Release/Interop.NATUPNPLib.dll differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.BeforeLogin.resources b/MSGer.tk/obj/Release/MSGer.tk.BeforeLogin.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.BeforeLogin.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.ChatPanel.resources b/MSGer.tk/obj/Release/MSGer.tk.ChatPanel.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.ChatPanel.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.ErrorHandler.resources b/MSGer.tk/obj/Release/MSGer.tk.ErrorHandler.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.ErrorHandler.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.FloatingChatIcon.resources b/MSGer.tk/obj/Release/MSGer.tk.FloatingChatIcon.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.FloatingChatIcon.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.Forms.SelectShownImage.resources b/MSGer.tk/obj/Release/MSGer.tk.Forms.SelectShownImage.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.Forms.SelectShownImage.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.PartnerInformation.resources b/MSGer.tk/obj/Release/MSGer.tk.PartnerInformation.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.PartnerInformation.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.Properties.Resources.resources b/MSGer.tk/obj/Release/MSGer.tk.Properties.Resources.resources index af48a80..24247ba 100644 Binary files a/MSGer.tk/obj/Release/MSGer.tk.Properties.Resources.resources and b/MSGer.tk/obj/Release/MSGer.tk.Properties.Resources.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.ScripterWindow.resources b/MSGer.tk/obj/Release/MSGer.tk.ScripterWindow.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.ScripterWindow.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelLayout.resources b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelLayout.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelLayout.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelNetwork.resources b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelNetwork.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelNetwork.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPacks.resources b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPacks.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPacks.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPersonal.resources b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPersonal.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.SettingsPanelPersonal.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.ThemeDesigner.resources b/MSGer.tk/obj/Release/MSGer.tk.ThemeDesigner.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.ThemeDesigner.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.ThemedForms.resources b/MSGer.tk/obj/Release/MSGer.tk.ThemedForms.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.ThemedForms.resources differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.csproj.FileListAbsolute.txt b/MSGer.tk/obj/Release/MSGer.tk.csproj.FileListAbsolute.txt index a9cd58a..3eda532 100644 --- a/MSGer.tk/obj/Release/MSGer.tk.csproj.FileListAbsolute.txt +++ b/MSGer.tk/obj/Release/MSGer.tk.csproj.FileListAbsolute.txt @@ -25,3 +25,41 @@ D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk (C#)\obj\Release\M D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\MSGer.tk.exe.config D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.exe D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\Interop.NATUPNPLib.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.csproj.ResolveComReference.cache +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\MSGer.tk.exe +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\MSGer.tk.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\GlacialList.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\Handwriting program.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\Khendys.Controls.ExRichTextBox.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\RichListView.dll +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\Handwriting program.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\RichListView.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\GlacialList.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\bin\Release\Khendys.Controls.ExRichTextBox.pdb +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.csprojResolveAssemblyReference.cache +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.AboutBox1.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.AddPartner.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.BeforeLogin.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ChatForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ChatPanel.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ErrorHandler.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.InvitePartner.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.LoginForm_RegistrationForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.MainForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.LoginForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.Notifier.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.PartnerInformation.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.FloatingChatIcon.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.Forms.SelectShownImage.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SettingsPanelLayout.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SettingsPanelNetwork.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SettingsPanelPacks.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SettingsPanelPersonal.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ThemeDesigner.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.Properties.Resources.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ScripterWindow.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SelectPartnerForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.SettingsForm.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.ThemedForms.resources +D:\Z - Norbi cucca\0 Projektek\MSGer.tk\0 Repository\MSGer.tk\obj\Release\MSGer.tk.csproj.GenerateResource.Cache diff --git a/MSGer.tk/obj/Release/MSGer.tk.csproj.GenerateResource.Cache b/MSGer.tk/obj/Release/MSGer.tk.csproj.GenerateResource.Cache index e2d2aae..6101802 100644 Binary files a/MSGer.tk/obj/Release/MSGer.tk.csproj.GenerateResource.Cache and b/MSGer.tk/obj/Release/MSGer.tk.csproj.GenerateResource.Cache differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.csproj.ResolveComReference.cache b/MSGer.tk/obj/Release/MSGer.tk.csproj.ResolveComReference.cache new file mode 100644 index 0000000..149a1d3 Binary files /dev/null and b/MSGer.tk/obj/Release/MSGer.tk.csproj.ResolveComReference.cache differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.csprojResolveAssemblyReference.cache b/MSGer.tk/obj/Release/MSGer.tk.csprojResolveAssemblyReference.cache index 78d5169..c9ff171 100644 Binary files a/MSGer.tk/obj/Release/MSGer.tk.csprojResolveAssemblyReference.cache and b/MSGer.tk/obj/Release/MSGer.tk.csprojResolveAssemblyReference.cache differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.exe b/MSGer.tk/obj/Release/MSGer.tk.exe index acc488b..2677fe6 100644 Binary files a/MSGer.tk/obj/Release/MSGer.tk.exe and b/MSGer.tk/obj/Release/MSGer.tk.exe differ diff --git a/MSGer.tk/obj/Release/MSGer.tk.pdb b/MSGer.tk/obj/Release/MSGer.tk.pdb index 7ba9397..4fbf78e 100644 Binary files a/MSGer.tk/obj/Release/MSGer.tk.pdb and b/MSGer.tk/obj/Release/MSGer.tk.pdb differ diff --git a/MSGer.tk/obj/Release/TempPE/.justforgithub b/MSGer.tk/obj/Release/TempPE/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/obj/Release/TempPE/Properties.Resources.Designer.cs.dll b/MSGer.tk/obj/Release/TempPE/Properties.Resources.Designer.cs.dll index 7c9638a..dffbdec 100644 Binary files a/MSGer.tk/obj/Release/TempPE/Properties.Resources.Designer.cs.dll and b/MSGer.tk/obj/Release/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/MSGer.tk/packages.config b/MSGer.tk/packages.config new file mode 100644 index 0000000..7eaca32 --- /dev/null +++ b/MSGer.tk/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MSGer.tk/packages/.justforgithub b/MSGer.tk/packages/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/packages/FCTB.2.16.11.0/.justforgithub b/MSGer.tk/packages/FCTB.2.16.11.0/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/packages/FCTB.2.16.11.0/FCTB.2.16.11.0.nupkg b/MSGer.tk/packages/FCTB.2.16.11.0/FCTB.2.16.11.0.nupkg new file mode 100644 index 0000000..00c68d2 Binary files /dev/null and b/MSGer.tk/packages/FCTB.2.16.11.0/FCTB.2.16.11.0.nupkg differ diff --git a/MSGer.tk/packages/FCTB.2.16.11.0/lib/.justforgithub b/MSGer.tk/packages/FCTB.2.16.11.0/lib/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.dll b/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.dll new file mode 100644 index 0000000..3480541 Binary files /dev/null and b/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.dll differ diff --git a/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.xml b/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.xml new file mode 100644 index 0000000..7213b1e --- /dev/null +++ b/MSGer.tk/packages/FCTB.2.16.11.0/lib/FastColoredTextBox.xml @@ -0,0 +1,3188 @@ + + + + FastColoredTextBox + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Highlights syntax for given language + + + + + Highlights syntax for given XML description file + + + + + Highlights C# code + + + + + + Highlights VB code + + + + + + Highlights HTML code + + + + + + Highlights XML code + + + + + + Highlights SQL code + + + + + + Highlights PHP code + + + + + + Highlights JavaScript code + + + + + + Highlights Lua code + + + + + + String style + + + + + Comment style + + + + + Number style + + + + + C# attribute style + + + + + Class name style + + + + + Keyword style + + + + + Style of tags in comments of C# + + + + + HTML attribute value style + + + + + HTML tag brackets style + + + + + HTML tag name style + + + + + HTML Entity style + + + + + XML attribute style + + + + + XML attribute value style + + + + + XML tag brackets style + + + + + XML tag name style + + + + + XML Entity style + + + + + XML CData style + + + + + Variable style + + + + + Specific PHP keyword style + + + + + Specific PHP keyword style + + + + + SQL Statements style + + + + + SQL Functions style + + + + + SQL Types style + + + + + Language + + + + + Item of autocomplete menu + + + + + Returns text for inserting into Textbox + + + + + Compares fragment text with this item + + + + + Returns text for display into popup menu + + + + + This method is called after item inserted into text + + + + + Title for tooltip. + + Return null for disable tooltip for this item + + + + Tooltip text. + + For display tooltip text, ToolTipTitle must be not null + + + + Menu text. This text is displayed in the drop-down menu. + + + + + Fore color of text of item + + + + + Back color of item + + + + + Item do not appears + + + + + Item appears + + + + + Item appears and will selected + + + + + Autocomplete item for code snippets + + Snippet can contain special char ^ for caret position. + + + + Compares fragment text with this item + + + + + This autocomplete item appears after dot + + + + + This Item does not check correspondence to current text fragment. + SuggestItem is intended for dynamic menus. + + + + + Style of chars + + This is base class for all text and design renderers + + + + Constructor + + + + + Renders given range of text + + Graphics object + Position of the range in absolute control coordinates + Rendering range of text + + + + Occurs when user click on StyleVisualMarker joined to this style + + + + + Shows VisualMarker + Call this method in Draw method, when you need to show VisualMarker for your style + + + + + Returns CSS for export to HTML + + + + + + Returns RTF descriptor for export to RTF + + + + + + This style is exported to outer formats (HTML for example) + + + + + Occurs when user click on StyleVisualMarker joined to this style + + + + + Style for chars rendering + This renderer can draws chars, with defined fore and back colors + + + + + Renderer for folded block + + + + + Renderer for selected area + + + + + Marker style + Draws background color for text + + + + + Draws small rectangle for popup menu + + + + + This style draws a wavy line below a given text range. + + Thanks for Yallie + + + + This style is used to mark range of text as ReadOnly block + + You can inherite this style to add visual effects of readonly text + + + + Popup menu for autocomplete + + + + + Shows popup menu immediately + + If True - MinFragmentLength will be ignored + + + + Regex pattern for serach fragment around caret + + + + + Minimum fragment length for popup + + + + + User selects item + + + + + It fires after item inserting + + + + + Occurs when popup menu is opening + + + + + Allow TAB for select menu item + + + + + Interval of menu appear (ms) + + + + + Back color of selected item + + + + + Border color of hovered item + + + + + Minimal size of menu + + + + + Image list of menu + + + + + Tooltip duration (ms) + + + + + Tooltip + + + + + This class contains the source text (chars and styles). + It stores a text lines, the manager of commands, undo/redo stack, styles. + + + + + This class contains the source text (chars and styles). + It stores a text lines, the manager of commands, undo/redo stack, styles. + + + + + Styles + + + + + Text lines + + + + + Occurs when line was inserted/added + + + + + Occurs when line was removed + + + + + Occurs when text was changed + + + + + Occurs when recalc is needed + + + + + Occurs when recalc wordwrap is needed + + + + + Occurs before text changing + + + + + Occurs after CurrentTB was changed + + + + + Current focused FastColoredTextBox + + + + + Default text style + This style is using when no one other TextStyle is not defined in Char.style + + + + + Lines count + + + + + Occurs when need to display line in the textbox + + + + + Occurs when need to save line in the file + + + + + End Of Line characters used for saving + + + + + This text will be displayed in textbox + + + + + This property contains only changed text. + If text of line is not changed, this property contains null. + + + + + This text will be saved in the file + + + + + This class records, stores and executes the macros. + + + + + Executes recorded macro + + + + + + Adds the char to current macro + + + + + Adds keyboard key to current macro + + + + + Clears last recorded macro + + + + + Allows to user to record macros + + + + + Returns current recording state. Set to True/False to start/stop recording programmatically. + + + + + FCTB + + + + + Returns True if last macro is empty + + + + + Macros as string. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + These classes are required for correct data binding to Text property of FastColoredTextbox + + + + + Diapason of text chars + + + + + Constructor + + + + + Constructor + + + + + Constructor + + + + + Constructor. Creates range of the line + + + + + Returns intersection with other range, + empty range returned otherwise + + + + + + + Returns union with other range. + + + + + + + Select all chars of control + + + + + Returns required char's number before start of the Range + + + + + Returns required char's number after start of the Range + + + + + Clone range + + + + + + Move range right + + This method jump over folded blocks + + + + Move range left + + This method can to go inside folded blocks + + + + Move range left + + This method jump over folded blocks + + + + Move range left + + This method can to go inside folded blocks + + + + Set style for range + + + + + Set style for given regex pattern + + + + + Set style for given regex + + + + + Set style for given regex pattern + + + + + Set style for given regex pattern + + + + + Set style for given regex pattern + + + + + Appends style to chars of range + + + + + Sets folding markers + + Pattern for start folding line + Pattern for finish folding line + + + + Sets folding markers + + Pattern for start folding line + Pattern for finish folding line + + + + Sets folding markers + + Pattern for start and end folding line + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern. + Search is separately in each line. + This method requires less memory than GetRanges(). + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex. + Search is separately in each line. + This method requires less memory than GetRanges(). + + Regex + Enumeration of ranges + + + + Finds ranges for given regex pattern. + Search is separately in each line (order of lines is reversed). + This method requires less memory than GetRanges(). + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex + + Enumeration of ranges + + + + Clear styles of range + + + + + Clear styles of range + + + + + Clear folding markers of all lines of range + + + + + Starts selection position updating + + + + + Ends selection position updating + + + + + Exchanges Start and End if End appears before Start + + + + + Exchanges Start and End + + + + + Expands range from first char of Start line to last char of End line + + + + + Get fragment of text around Start place. Returns maximal matched to pattern fragment. + + Allowed chars pattern for fragment + Range of found fragment + + + + Get fragment of text around Start place. Returns maximal matched to given Style. + + Allowed style for fragment + Range of found fragment + + + + Get fragment of text around Start place. Returns maximal mathed to pattern fragment. + + Allowed chars pattern for fragment + Range of found fragment + + + + Is char before range readonly + + + + + + Is char after range readonly + + + + + + Return true if no selected text + + + + + Column selection mode + + + + + Start line and char position + + + + + Finish line and char position + + + + + Text of range + + This property has not 'set' accessor because undo/redo stack works only with + FastColoredTextBox.Selection range. So, if you want to set text, you need to use FastColoredTextBox.Selection + and FastColoredTextBox.InsertText() mehtod. + + + + + Returns first char after Start place + + + + + Returns first char before Start place + + + + + Return minimum of end.X and start.X + + + + + Return maximum of end.X and start.X + + + + + Chars of range (exclude \n) + + + + + Range is readonly? + This property return True if any char of the range contains ReadOnlyStyle. + Set this property to True/False to mark chars of the range as Readonly/Writable. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Returns edited hotkey map + + + + + + Fast colored textbox + + + + + Constructor + + + + + Removes all hints + + + + + Add and shows the hint + + Linked range + Inner control + Scrolls textbox to the hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Add and shows the hint + + Linked range + Inner control + + + + Add and shows simple text hint + + Linked range + Text of simple hint + Scrolls textbox to the hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Add and shows simple text hint + + Linked range + Text of simple hint + + + + Occurs when user click on the hint + + + + + + Occurs when VisibleRange is changed + + + + + Invalidates the entire surface of the control and causes the control to be redrawn. + This method is thread safe and does not require Invoke. + + + + + Returns list of styles of given place + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Call this method if the recalc of the position of lines is needed. + + + + + Navigates forward (by Line.LastVisit property) + + + + + Navigates backward (by Line.LastVisit property) + + + + + Navigates to defined line, without Line.LastVisit reseting + + + + + Add new style + + Layer index of this style + + + + Shows find dialog + + + + + Shows find dialog + + + + + Shows replace dialog + + + + + Shows replace dialog + + + + + Gets length of given line + + Line index + Length of line + + + + Get range of line + + Line index + + + + Copy selected text into Clipboard + + + + + Cut selected text into Clipboard + + + + + Paste text from clipboard into selected position + + + + + Select all chars of text + + + + + Move caret to end of text + + + + + Move caret to first position + + + + + Clear text, styles, history, caches + + + + + Clear buffer of styles + + + + + Clear style of all text + + + + + Clears undo and redo stacks + + + + + Insert text into current selected position + + + + + Insert text into current selected position + + + + + + Insert text into current selection position (with predefined style) + + + + + + Insert text into current selection position (with predefined style) + + + + + Append string to end of the Text + + + + + Append string to end of the Text + + + + + Returns index of the style in Styles + -1 otherwise + + + Index of the style in Styles + + + + Returns StyleIndex mask of given styles + + + StyleIndex mask of given styles + + + + Deletes selected chars + + + + + Deletes current line(s) + + + + + Calculates wordwrap cutoffs + + + + + Scroll control for display defined rectangle + + + + + + Updates scrollbar position after Value changed + + + + + Scroll control for display caret + + + + + Scroll control left + + + + + Scroll control for display selection area + + + + + Scroll control for display given range + + + + + Scroll control for display given range + + + + + Process control keys + + + + + Scrolls to nearest bookmark or to first bookmark + + Current bookmark line index + + + + Scrolls to nearest previous bookmark or to last bookmark + + Current bookmark line index + + + + Bookmarks line + + + + + Unbookmarks current line + + + + + Moves selected lines down + + + + + Moves selected lines up + + + + + Convert selected text to upper case + + + + + Convert selected text to lower case + + + + + Convert selected text to title case + + + + + Insert/remove comment prefix into selected lines + + + + + Insert/remove comment prefix into selected lines + + + + + Process "real" keys (no control) + + + + + Do AutoIndentChars + + + + + Finds given char after current caret position, moves the caret to found pos. + + + + + + Inserts autoindent's spaces in the line + + + + + Returns needed start space count for the line + + + + + Undo last operation + + + + + Redo + + + + + Draws text to given Graphics + + + Start place of drawing text + Size of drawing + + + + Draw control + + + + + Gets the value for the system control panel mouse wheel scroll settings. + The value returns the number of lines that shall be scolled if the user turns the mouse wheet one step. + + + This methods gets the "WheelScrollLines" value our from the registry key "HKEY_CURRENT_USER\Control Panel\Desktop". + If the value of this option is 0, the screen will not scroll when the mouse wheel is turned. + If the value of this option is -1 or is greater than the number of lines visible in the window, + the screen will scroll up or down by one page. + + + Number of lines to scrol l when the mouse wheel is turned + + + + + Gets nearest line and char position from coordinates + + Point + Line and char position + + + + Gets nearest absolute text position for given point + + Point + Position + + + + Fires TextChanging event + + + + + Fires TextChanged event + + + + + Fires TextChanged event + + + + + Fires TextChanged event + + + + + Call this method before multiple text changing + + + + + Call this method after multiple text changing + + + + + Fires TextChanged event + + + + + Clears folding state for range of text + + + + + Fires SelectionChanged event + + + + + Gets absolute text position from line and char position + + Line and char position + Point of char + + + + Gets line and char position from absolute text position + + + + + Gets absolute char position from char position + + + + + Gets point for given line and char position + + Line and char position + Coordiantes + + + + Get range of text + + Absolute start position + Absolute finish position + Range + + + + Get range of text + + Line and char position + Line and char position + Range + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Finds ranges for given regex pattern + + Regex pattern + Enumeration of ranges + + + + Get text of given line + + Line index + Text + + + + Exapnds folded block + + Start line + + + + Collapse folding blocks using FoldedBlocks dictionary. + + + + + Expand collapsed block + + + + + Expand collapsed block + + Any line inside collapsed block + + + + Collapses all folding blocks + + + + + Exapnds all folded blocks + + + + + + Collapses folding block + + Start folding line + + + + Start foilding marker for the line + + + + + End foilding marker for the line + + + + + Collapse text block + + + + + Insert TAB into front of seletcted lines. + + + + + Remove TAB from front of seletcted lines. + + + + + Remove TAB in front of the caret ot the selected line. + + + + + Insert autoindents into selected lines + + + + + Insert prefix into front of seletcted lines + + + + + Remove prefix from front of selected lines + This method ignores forward spaces of the line + + + + + Begins AutoUndo block. + All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. + + + + + Ends AutoUndo block. + All changes of text between BeginAutoUndo() and EndAutoUndo() will be canceled in one operation Undo. + + + + + Highlights brackets around caret + + + + + Returns range between brackets (or null if not found) + + + + + Selectes next fragment for given regex. + + + + + Prints range of text + + + + + Prints all text + + + + + Prints all text, without any dialog windows + + + + + Open text file + + + + + Open text file (with automatic encoding detector) + + + + + Open file binding mode + + + + + + + Close file binding mode + + + + + Save text to the file + + + + + + + Set VisibleState of line + + + + + Returns VisibleState of the line + + + + + Shows Goto dialog form + + + + + Occurs when undo/redo stack is changed + + + + + Search lines by regex pattern + + + + + Removes given lines + + + + + Activates the scrolling mode (middle click button). + + MouseEventArgs + + + + Deactivates the scrolling mode (middle click button). + + + + + Restore scrolls + + + + + AutoComplete brackets + + + + + Colors of some service visual markers + + + + + Contains UniqueId of start lines of folded blocks + + This dictionary remembers folding state of blocks. + It is needed to restore child folding after user collapsed/expanded top-level folding block. + + + + Strategy of search of brackets to highlighting + + + + + Automatically shifts secondary wordwrap lines on the shift amount of the first line + + + + + Indent of secondary wordwrap lines (in chars) + + + + + MacrosManager records, stores and executes the macroses + + + + + Allows drag and drop + + + + + Collection of Hints. + This is temporary buffer for currently displayed hints. + + You can asynchronously add, remove and clear hints. Appropriate hints will be shown or hidden from the screen. + + + + Delay (ms) of ToolTip + + + + + ToolTip component + + + + + Color of bookmarks + + + + + Bookmarks + + + + + Enables virtual spaces + + + + + Strategy of search of end of folding block + + + + + Indicates if tab characters are accepted as input + + + + + Indicates if return characters are accepted as input + + + + + Shows or hides the caret + + + + + Enables caret blinking + + + + + Color of border of text area + + + + + Type of border of text area + + + + + Background color for current line + + + + + Background color for highlighting of changed lines + + + + + Fore color (default style color) + + + + + Height of char in pixels (includes LineInterval) + + + + + Interval between lines (in pixels) + + + + + Width of char in pixels + + + + + Spaces count for tab + + + + + Text was changed + + + + + Text version + + This counter is incremented each time changes the text + + + + Read only + + + + + Shows line numbers. + + + + + Shows vertical lines between folding start line and folding end line. + + + + + Rectangle where located text + + + + + Color of line numbers. + + + + + Start value of first line number. + + + + + Background color of indent area + + + + + Background color of padding area + + + + + Color of disabled component + + + + + Color of caret + + + + + Wide caret + + + + + Color of service lines (folding lines, borders of blocks etc.) + + + + + Padings of text area + + + + + --Do not use this property-- + + + + + Color of folding area indicator + + + + + Enables folding indicator (left vertical line between folding bounds) + + + + + Left distance to text beginning + + + + + Left padding in pixels + + + + + This property draws vertical line after defined char position. + Set to 0 for disable drawing of vertical line. + + + + + Styles + + + + + Hotkeys. Do not use this property in your code, use HotkeysMapping property. + + + + + Hotkeys mapping + + + + + Default text style + This style is using when no one other TextStyle is not defined in Char.style + + + + + Style for rendering Selection area + + + + + Style for folded block rendering + + + + + Style for brackets highlighting + + + + + Style for alternative brackets highlighting + + + + + Opening bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Closing bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Alternative opening bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Alternative closing bracket for brackets highlighting. + Set to '\x0' for disable brackets highlighting. + + + + + Comment line prefix. + + + + + This property specifies which part of the text will be highlighted as you type (by built-in highlighter). + + When a user enters text, a component refreshes highlighting (because the text was changed). + This property specifies exactly which section of the text will be re-highlighted. + This can be useful to highlight multi-line comments, for example. + + + + Is keyboard in replace mode (wide caret) ? + + + + + Allows text rendering several styles same time. + + + + + Allows to record macros. + + + + + Allows AutoIndent. Inserts spaces before new line. + + + + + Does autoindenting in existing lines. It works only if AutoIndent is True. + + + + + Minimal delay(ms) for delayed events (except TextChangedDelayed). + + + + + Minimal delay(ms) for TextChangedDelayed event. + + + + + Language for highlighting by built-in highlighter. + + + + + Syntax Highlighter + + + + + XML file with description of syntax highlighting. + This property works only with Language == Language.Custom. + + + + + Position of left highlighted bracket. + + + + + Position of right highlighted bracket. + + + + + Position of left highlighted alternative bracket. + + + + + Position of right highlighted alternative bracket. + + + + + Start line index of current highlighted folding area. Return -1 if start of area is not found. + + + + + End line index of current highlighted folding area. Return -1 if end of area is not found. + + + + + TextSource + + + + + The source of the text. + Allows to get text from other FastColoredTextBox. + + + + + Returns current visible range of text + + + + + Current selection range + + + + + Background color. + It is used if BackBrush is null. + + + + + Background brush. + If Null then BackColor is used. + + + + + Multiline + + + + + WordWrap. + + + + + WordWrap mode. + + + + + If true then line breaks included into the selection will be selected too. + Then line breaks will be shown as selected blank character. + + + + + Do not change this property + + + + + Count of lines + + + + + Gets or sets char and styleId for given place + This property does not fire OnTextChanged event + + + + + Gets Line + + + + + Text of control + + + + + Text lines + + + + + Gets colored text as HTML + + For more flexibility you can use ExportToHTML class also + + + + Gets colored text as RTF + + For more flexibility you can use ExportToRTF class also + + + + Text of current selection + + + + + Start position of selection + + + + + Length of selected text + + + + + Font + + Use only monospaced font + + + + Font + + Use only monospaced font + + + + Indicates that IME is allowed (for CJK language entering) + + + + + Is undo enabled? + + + + + Is redo enabled? + + + + + Range of all text + + + + + Color of selected area + + + + + Reserved space for line number characters. + If smaller than needed (e. g. line count >= 10 and this value set to 1) this value will have no impact. + If you want to reserve space, e. g. for line numbers >= 10 or >= 100 than you can set this value to 2 or 3 or higher. + + + + + Occurs when mouse is moving over text and tooltip is needed + + + + + HintClick event. + It occurs if user click on the hint. + + + + + TextChanged event. + It occurs after insert, delete, clear, undo and redo operations. + + + + + Fake event for correct data binding + + + + + Occurs when user paste text from clipboard + + + + + TextChanging event. + It occurs before insert, delete, clear, undo and redo operations. + + + + + SelectionChanged event. + It occurs after changing of selection. + + + + + VisibleRangeChanged event. + It occurs after changing of visible range. + + + + + TextChangedDelayed event. + It occurs after insert, delete, clear, undo and redo operations. + This event occurs with a delay relative to TextChanged, and fires only once. + + + + + SelectionChangedDelayed event. + It occurs after changing of selection. + This event occurs with a delay relative to SelectionChanged, and fires only once. + + + + + VisibleRangeChangedDelayed event. + It occurs after changing of visible range. + This event occurs with a delay relative to VisibleRangeChanged, and fires only once. + + + + + It occurs when user click on VisualMarker. + + + + + It occurs when visible char is enetering (alphabetic, digit, punctuation, DEL, BACKSPACE) + + Set Handle to True for cancel key + + + + It occurs when visible char is enetered (alphabetic, digit, punctuation, DEL, BACKSPACE) + + + + + It occurs when calculates AutoIndent for new line + + + + + It occurs when line background is painting + + + + + Occurs when line was inserted/added + + + + + Occurs when line was removed + + + + + Occurs when current highlighted folding area is changed. + Current folding area see in StartFoldingLine and EndFoldingLine. + + + + + + Occurs when undo/redo stack is changed + + + + + + Occurs when component was zoomed + + + + + Occurs when user pressed key, that specified as CustomAction + + + + + Occurs when scroolbars are updated + + + + + Occurs when custom wordwrap is needed + + + + + Enables AutoIndentChars mode + + + + + Regex patterns for AutoIndentChars (one regex per line) + + + + + Zooming (in percentages) + + + + + Inserted line index + + + + + Count of inserted lines + + + + + Removed line index + + + + + Count of removed lines + + + + + UniqueIds of removed lines + + + + + TextChanged event argument + + + + + Constructor + + + + + This range contains changed area of text + + + + + Set to true if you want to cancel text inserting + + + + + Word wrapping by control width + + + + + Word wrapping by preferred line width (PreferredLineWidth) + + + + + Char wrapping by control width + + + + + Char wrapping by preferred line width (PreferredLineWidth) + + + + + Custom wrap (by event WordWrapNeeded) + + + + + Title of page. If you want to print Title on the page, insert code &w in Footer or Header. + + + + + Footer of page. + Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). + More detailed see here + + + + + Header of page + Here you can use special codes: &w (Window title), &D, &d (Date), &t(), &4 (Time), &p (Current page number), &P (Total number of pages), && (A single ampersand), &b (Right justify text, Center text. If &b occurs once, then anything after the &b is right justified. If &b occurs twice, then anything between the two &b is centered, and anything after the second &b is right justified). + More detailed see here + + + + + Prints line numbers + + + + + Additional spaces count for this line, relative to previous line + + + + + Additional spaces count for next line, relative to previous line + + + + + Absolute indentation of current line. You can change this property if you want to set absolute indentation. + + + + + Type of highlighting + + + + + Highlight only changed range of text. Highest performance. + + + + + Highlight visible range of text. Middle performance. + + + + + Highlight all (visible and invisible) text. Lowest performance. + + + + + Strategy of search of end of folding block + + + + + Strategy of search of brackets to highlighting + + + + + ToolTipNeeded event args + + + + + HintClick event args + + + + + CustomAction event args + + + + + Style index mask (16 styles) + + + + + Required designer variable. + + + + + Clean up any resources being used. + + true if managed resources should be disposed; otherwise, false. + + + + Required method for Designer support - do not modify + the contents of this method with the code editor. + + + + + Shows document map of FCTB + + + + + Scale + + + + + Scrollbar visibility + + + + + Base class for bookmark collection + + + + + Collection of bookmarks + + + + + Removes bookmark by line index + + + + + Returns Bookmark by index. + + + + + Bookmark of FastColoredTextbox + + + + + Scroll textbox to the bookmark + + + + + Name of bookmark + + + + + Line index + + + + + Color of bookmark sign + + + + + Line index and char index + + + + + Line of text + + + + + Clears style of chars, delete folding markers + + + + + Clears folding markers + + + + + Text of line was changed + + + + + Time of last visit of caret in this line + + This property can be used for forward/backward navigating + + + + Background brush. + + + + + Unique ID + + + + + Count of needed start spaces for AutoIndent + + + + + Text of the line + + + + + Count of start spaces + + + + + Chars count + + + + + Visible state + + + + + Gets index of wordwrap string for given char position + + + + + Positions for wordwrap cutoffs + + + + + Count of wordwrap string count for this line + + + + + Limited stack + + + + + Constructor + + Maximum length of stack + + + + Pop item + + + + + Peek item + + + + + Push item + + + + + Clear stack + + + + + Max stack length + + + + + Current length of stack + + + + + Char and style + + + + + Unicode character + + + + + Style bit mask + + Bit 1 in position n means that this char will rendering by FastColoredTextBox.Styles[n] + + + + Insert single char + + This operation includes also insertion of new line and removing char by backspace + + + + Constructor + + Underlaying textbox + Inserting char + + + + Undo operation + + + + + Execute operation + + + + + Merge lines i and i+1 + + + + + Insert text + + + + + Constructor + + Underlaying textbox + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Insert text into given ranges + + + + + Constructor + + Underlaying textbox + List of ranges for replace + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Clear selected text + + + + + Construstor + + Underlaying textbox + + + + Undo operation + + + + + Execute operation + + + + + Replaces text + + + + + Constructor + + Underlaying textsource + List of ranges for replace + + + + Undo operation + + + + + Execute operation + + + + + Removes lines + + + + + Constructor + + Underlaying textbox + List of ranges for replace + Text for inserting + + + + Undo operation + + + + + Execute operation + + + + + Wrapper for multirange commands + + + + + Remembers current selection and restore it after Undo + + + + + Exports colored text as RTF + + At this time only TextStyle renderer is supported. Other styles is not exported. + + + + Includes line numbers + + + + + Use original font + + + + + Dictionary of shortcuts for FCTB + + + + + Actions for shortcuts + + + + + Collection of Hints. + This is temporary buffer for currently displayed hints. + + + + + Clears all displayed hints + + + + + Add and shows the hint + + + + + + Is collection contains the hint? + + + + + Count of hints + + + + + Hint of FastColoredTextbox + + + + + Scroll textbox to the hint + + + + + Creates Hint + + Linked range + Text for simple hint + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Creates Hint + + Linked range + Text for simple hint + + + + Creates Hint + + Linked range + Inner control + Inlining. If True then hint will moves apart text + Docking. If True then hint will fill whole line + + + + Creates Hint + + Linked range + Inner control + + + + Text of simple hint + + + + + Linked range + + + + + Backcolor + + + + + Second backcolor + + + + + Border color + + + + + Fore color + + + + + Text alignment + + + + + Font + + + + + Occurs when user click on simple hint + + + + + Inner control + + + + + Docking (allows None and Fill only) + + + + + Width of hint (if Dock is None) + + + + + Height of hint + + + + + Host panel + + + + + Tag + + + + + Cursor + + + + + Inlining. If True then hint will moves apart text. + + + + + Exports colored text as HTML + + At this time only TextStyle renderer is supported. Other styles is not exported. + + + + Use nbsp; instead space + + + + + Use nbsp; instead space in beginning of line + + + + + Use original font + + + + + Use style tag instead style attribute + + + + + Use 'br' tag instead of '\n' + + + + + Includes line numbers + + + + diff --git a/MSGer.tk/packages/repositories.config b/MSGer.tk/packages/repositories.config new file mode 100644 index 0000000..e69fb5a --- /dev/null +++ b/MSGer.tk/packages/repositories.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MSGerTextBox/.justforgithub b/MSGerTextBox/.justforgithub new file mode 100644 index 0000000..e69de29 diff --git a/MSGerTextBox/App.config b/MSGerTextBox/App.config new file mode 100644 index 0000000..fad249e --- /dev/null +++ b/MSGerTextBox/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MSGerTextBox/Diff.cs b/MSGerTextBox/Diff.cs new file mode 100644 index 0000000..1d471a5 --- /dev/null +++ b/MSGerTextBox/Diff.cs @@ -0,0 +1,537 @@ +namespace my.utils { + using System; + using System.Collections; + using System.Text; + using System.Text.RegularExpressions; + + /// + /// This Class implements the Difference Algorithm published in + /// "An O(ND) Difference Algorithm and its Variations" by Eugene Myers + /// Algorithmica Vol. 1 No. 2, 1986, p 251. + /// + /// There are many C, Java, Lisp implementations public available but they all seem to come + /// from the same source (diffutils) that is under the (unfree) GNU public License + /// and cannot be reused as a sourcecode for a commercial application. + /// There are very old C implementations that use other (worse) algorithms. + /// Microsoft also published sourcecode of a diff-tool (windiff) that uses some tree data. + /// Also, a direct transfer from a C source to C# is not easy because there is a lot of pointer + /// arithmetic in the typical C solutions and i need a managed solution. + /// These are the reasons why I implemented the original published algorithm from the scratch and + /// make it avaliable without the GNU license limitations. + /// I do not need a high performance diff tool because it is used only sometimes. + /// I will do some performace tweaking when needed. + /// + /// The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents + /// each line is converted into a (hash) number. See DiffText(). + /// + /// Some chages to the original algorithm: + /// The original algorithm was described using a recursive approach and comparing zero indexed arrays. + /// Extracting sub-arrays and rejoining them is very performance and memory intensive so the same + /// (readonly) data arrays are passed arround together with their lower and upper bounds. + /// This circumstance makes the LCS and SMS functions more complicate. + /// I added some code to the LCS function to get a fast response on sub-arrays that are identical, + /// completely deleted or inserted. + /// + /// The result from a comparisation is stored in 2 arrays that flag for modified (deleted or inserted) + /// lines in the 2 data arrays. These bits are then analysed to produce a array of Item objects. + /// + /// Further possible optimizations: + /// (first rule: don't do it; second: don't do it yet) + /// The arrays DataA and DataB are passed as parameters, but are never changed after the creation + /// so they can be members of the class to avoid the paramter overhead. + /// In SMS is a lot of boundary arithmetic in the for-D and for-k loops that can be done by increment + /// and decrement of local variables. + /// The DownVector and UpVector arrays are alywas created and destroyed each time the SMS gets called. + /// It is possible to reuse tehm when transfering them to members of the class. + /// See TODO: hints. + /// + /// diff.cs: A port of the algorythm to C# + /// Created by Matthias Hertel, see http://www.mathertel.de + /// This work is licensed under a Creative Commons Attribution 2.0 Germany License. + /// see http://creativecommons.org/licenses/by/2.0/de/ + /// + /// Changes: + /// 2002.09.20 There was a "hang" in some situations. + /// Now I undestand a little bit more of the SMS algorithm. + /// There have been overlapping boxes; that where analyzed partial differently. + /// One return-point is enough. + /// A assertion was added in CreateDiffs when in debug-mode, that counts the number of equal (no modified) lines in both arrays. + /// They must be identical. + /// + /// 2003.02.07 Out of bounds error in the Up/Down vector arrays in some situations. + /// The two vetors are now accessed using different offsets that are adjusted using the start k-Line. + /// A test case is added. + /// + /// 2006.03.05 Some documentation and a direct Diff entry point. + /// + /// 2006.03.08 Refactored the API to static methods on the Diff class to make usage simpler. + /// 2006.03.10 using the standard Debug class for self-test now. + /// compile with: csc /target:exe /out:diffTest.exe /d:DEBUG /d:TRACE /d:SELFTEST Diff.cs + /// + + public class Diff { + + /// details of one difference. + public struct Item { + /// Start Line number in Data A. + public int StartA; + /// Start Line number in Data B. + public int StartB; + + /// Number of changes in Data A. + public int deletedA; + /// Number of changes in Data A. + public int insertedB; + } // Item + + /// + /// Shortest Middle Snake Return Data + /// + private struct SMSRD { + internal int x, y; + // internal int u, v; // 2002.09.20: no need for 2 points + } + + + #region self-Test + +#if (SELFTEST) + /// + /// start a self- / box-test for some diff cases and report to the debug output. + /// + /// not used + /// always 0 + public static int Main(string[] args) { + StringBuilder ret = new StringBuilder(); + string a, b; + + System.Diagnostics.ConsoleTraceListener ctl = new System.Diagnostics.ConsoleTraceListener(false); + System.Diagnostics.Debug.Listeners.Add(ctl); + + System.Console.WriteLine("Diff Self Test..."); + + // test all changes + a = "a,b,c,d,e,f,g,h,i,j,k,l".Replace(',', '\n'); + b = "0,1,2,3,4,5,6,7,8,9".Replace(',', '\n'); + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "12.10.0.0*", + "all-changes test failed."); + System.Diagnostics.Debug.WriteLine("all-changes test passed."); + // test all same + a = "a,b,c,d,e,f,g,h,i,j,k,l".Replace(',', '\n'); + b = a; + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "", + "all-same test failed."); + System.Diagnostics.Debug.WriteLine("all-same test passed."); + + // test snake + a = "a,b,c,d,e,f".Replace(',', '\n'); + b = "b,c,d,e,f,x".Replace(',', '\n'); + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "1.0.0.0*0.1.6.5*", + "snake test failed."); + System.Diagnostics.Debug.WriteLine("snake test passed."); + + // 2002.09.20 - repro + a = "c1,a,c2,b,c,d,e,g,h,i,j,c3,k,l".Replace(',', '\n'); + b = "C1,a,C2,b,c,d,e,I1,e,g,h,i,j,C3,k,I2,l".Replace(',', '\n'); + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "1.1.0.0*1.1.2.2*0.2.7.7*1.1.11.13*0.1.13.15*", + "repro20020920 test failed."); + System.Diagnostics.Debug.WriteLine("repro20020920 test passed."); + + // 2003.02.07 - repro + a = "F".Replace(',', '\n'); + b = "0,F,1,2,3,4,5,6,7".Replace(',', '\n'); + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "0.1.0.0*0.7.1.2*", + "repro20030207 test failed."); + System.Diagnostics.Debug.WriteLine("repro20030207 test passed."); + + // Muegel - repro + a = "HELLO\nWORLD"; + b = "\n\nhello\n\n\n\nworld\n"; + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "2.8.0.0*", + "repro20030409 test failed."); + System.Diagnostics.Debug.WriteLine("repro20030409 test passed."); + + // test some differences + a = "a,b,-,c,d,e,f,f".Replace(',', '\n'); + b = "a,b,x,c,e,f".Replace(',', '\n'); + System.Diagnostics.Debug.Assert(TestHelper(Diff.DiffText(a, b, false, false, false)) + == "1.1.2.2*1.0.4.4*1.0.6.5*", + "some-changes test failed."); + System.Diagnostics.Debug.WriteLine("some-changes test passed."); + + System.Diagnostics.Debug.WriteLine("End."); + System.Diagnostics.Debug.Flush(); + + return (0); + } + + + public static string TestHelper(Item []f) { + StringBuilder ret = new StringBuilder(); + for (int n = 0; n < f.Length; n++) { + ret.Append(f[n].deletedA.ToString() + "." + f[n].insertedB.ToString() + "." + f[n].StartA.ToString() + "." + f[n].StartB.ToString() + "*"); + } + // Debug.Write(5, "TestHelper", ret.ToString()); + return (ret.ToString()); + } +#endif + #endregion + + + /// + /// Find the difference in 2 texts, comparing by textlines. + /// + /// A-version of the text (usualy the old one) + /// B-version of the text (usualy the new one) + /// Returns a array of Items that describe the differences. + public Item [] DiffText(string TextA, string TextB) { + return(DiffText(TextA, TextB, false, false, false)); + } // DiffText + + + /// + /// Find the difference in 2 text documents, comparing by textlines. + /// The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents + /// each line is converted into a (hash) number. This hash-value is computed by storing all + /// textlines into a common hashtable so i can find dublicates in there, and generating a + /// new number each time a new textline is inserted. + /// + /// A-version of the text (usualy the old one) + /// B-version of the text (usualy the new one) + /// When set to true, all leading and trailing whitespace characters are stripped out before the comparation is done. + /// When set to true, all whitespace characters are converted to a single space character before the comparation is done. + /// When set to true, all characters are converted to their lowercase equivivalence before the comparation is done. + /// Returns a array of Items that describe the differences. + public static Item [] DiffText(string TextA, string TextB, bool trimSpace, bool ignoreSpace, bool ignoreCase) { + // prepare the input-text and convert to comparable numbers. + Hashtable h = new Hashtable(TextA.Length + TextB.Length); + + // The A-Version of the data (original data) to be compared. + DiffData DataA = new DiffData(DiffCodes(TextA, h, trimSpace, ignoreSpace, ignoreCase)); + + // The B-Version of the data (modified data) to be compared. + DiffData DataB = new DiffData(DiffCodes(TextB, h, trimSpace, ignoreSpace, ignoreCase)); + + h = null; // free up hashtable memory (maybe) + + LCS(DataA, 0, DataA.Length, DataB, 0, DataB.Length); + return CreateDiffs(DataA, DataB); + } // DiffText + + + /// + /// Find the difference in 2 arrays of integers. + /// + /// A-version of the numbers (usualy the old one) + /// B-version of the numbers (usualy the new one) + /// Returns a array of Items that describe the differences. + public static Item [] DiffInt(int[] ArrayA, int[] ArrayB) { + // The A-Version of the data (original data) to be compared. + DiffData DataA = new DiffData(ArrayA); + + // The B-Version of the data (modified data) to be compared. + DiffData DataB = new DiffData(ArrayB); + + LCS(DataA, 0, DataA.Length, DataB, 0, DataB.Length); + return CreateDiffs(DataA, DataB); + } // Diff + + + /// + /// This function converts all textlines of the text into unique numbers for every unique textline + /// so further work can work only with simple numbers. + /// + /// the input text + /// This extern initialized hashtable is used for storing all ever used textlines. + /// ignore leading and trailing space characters + /// a array of integers. + private static int[] DiffCodes(string aText, Hashtable h, bool trimSpace, bool ignoreSpace, bool ignoreCase) { + // get all codes of the text + string []Lines; + int []Codes; + int lastUsedCode = h.Count; + object aCode; + string s; + + // strip off all cr, only use lf as textline separator. + aText = aText.Replace("\r", ""); + Lines = aText.Split('\n'); + + Codes = new int[Lines.Length]; + + for (int i = 0; i < Lines.Length; ++i) { + s = Lines[i]; + if (trimSpace) + s = s.Trim(); + + if (ignoreSpace) { + s = Regex.Replace(s, "\\s+", " "); // TO!DO: optimization: faster blank removal. + } + + if (ignoreCase) + s = s.ToLower(); + + aCode = h[s]; + if (aCode == null) { + lastUsedCode++; + h[s] = lastUsedCode; + Codes[i] = lastUsedCode; + } else { + Codes[i] = (int)aCode; + } // if + } // for + return(Codes); + } // DiffCodes + + + /// + /// This is the algorithm to find the Shortest Middle Snake (SMS). + /// + /// sequence A + /// lower bound of the actual range in DataA + /// upper bound of the actual range in DataA (exclusive) + /// sequence B + /// lower bound of the actual range in DataB + /// upper bound of the actual range in DataB (exclusive) + /// a MiddleSnakeData record containing x,y and u,v + private static SMSRD SMS(DiffData DataA, int LowerA, int UpperA, DiffData DataB, int LowerB, int UpperB) { + SMSRD ret; + int MAX = DataA.Length + DataB.Length + 1; + + int DownK = LowerA - LowerB; // the k-line to start the forward search + int UpK = UpperA - UpperB; // the k-line to start the reverse search + + int Delta = (UpperA - LowerA) - (UpperB - LowerB); + bool oddDelta = (Delta & 1) != 0; + + /// vector for the (0,0) to (x,y) search + int[] DownVector = new int[2* MAX + 2]; + + /// vector for the (u,v) to (N,M) search + int[] UpVector = new int[2 * MAX + 2]; + + // The vectors in the publication accepts negative indexes. the vectors implemented here are 0-based + // and are access using a specific offset: UpOffset UpVector and DownOffset for DownVektor + int DownOffset = MAX - DownK; + int UpOffset = MAX - UpK; + + int MaxD = ((UpperA - LowerA + UpperB - LowerB) / 2) + 1; + + // Debug.Write(2, "SMS", String.Format("Search the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB)); + + // init vectors + DownVector[DownOffset + DownK + 1] = LowerA; + UpVector[UpOffset + UpK - 1] = UpperA; + + for (int D = 0; D <= MaxD; D++) { + + // Extend the forward path. + for (int k = DownK - D; k <= DownK + D; k += 2) { + // Debug.Write(0, "SMS", "extend forward path " + k.ToString()); + + // find the only or better starting point + int x, y; + if (k == DownK - D) { + x = DownVector[DownOffset + k+1]; // down + } else { + x = DownVector[DownOffset + k-1] + 1; // a step to the right + if ((k < DownK + D) && (DownVector[DownOffset + k+1] >= x)) + x = DownVector[DownOffset + k+1]; // down + } + y = x - k; + + // find the end of the furthest reaching forward D-path in diagonal k. + while ((x < UpperA) && (y < UpperB) && (DataA.data[x] == DataB.data[y])) { + x++; y++; + } + DownVector[DownOffset + k] = x; + + // overlap ? + if (oddDelta && (UpK-D < k) && (k < UpK+D)) { + if (UpVector[UpOffset + k] <= DownVector[DownOffset + k]) { + ret.x = DownVector[DownOffset + k]; + ret.y = DownVector[DownOffset + k] - k; + // ret.u = UpVector[UpOffset + k]; // 2002.09.20: no need for 2 points + // ret.v = UpVector[UpOffset + k] - k; + return (ret); + } // if + } // if + + } // for k + + // Extend the reverse path. + for (int k = UpK - D; k <= UpK + D; k += 2) { + // Debug.Write(0, "SMS", "extend reverse path " + k.ToString()); + + // find the only or better starting point + int x, y; + if (k == UpK + D) { + x = UpVector[UpOffset + k-1]; // up + } else { + x = UpVector[UpOffset + k+1] - 1; // left + if ((k > UpK - D) && (UpVector[UpOffset + k-1] < x)) + x = UpVector[UpOffset + k-1]; // up + } // if + y = x - k; + + while ((x > LowerA) && (y > LowerB) && (DataA.data[x-1] == DataB.data[y-1])) { + x--; y--; // diagonal + } + UpVector[UpOffset + k] = x; + + // overlap ? + if (! oddDelta && (DownK-D <= k) && (k <= DownK+D)) { + if (UpVector[UpOffset + k] <= DownVector[DownOffset + k]) { + ret.x = DownVector[DownOffset + k]; + ret.y = DownVector[DownOffset + k] - k; + // ret.u = UpVector[UpOffset + k]; // 2002.09.20: no need for 2 points + // ret.v = UpVector[UpOffset + k] - k; + return (ret); + } // if + } // if + + } // for k + + } // for D + + throw new ApplicationException("the algorithm should never come here."); + } // SMS + + + /// + /// This is the divide-and-conquer implementation of the longes common-subsequence (LCS) + /// algorithm. + /// The published algorithm passes recursively parts of the A and B sequences. + /// To avoid copying these arrays the lower and upper bounds are passed while the sequences stay constant. + /// + /// sequence A + /// lower bound of the actual range in DataA + /// upper bound of the actual range in DataA (exclusive) + /// sequence B + /// lower bound of the actual range in DataB + /// upper bound of the actual range in DataB (exclusive) + private static void LCS(DiffData DataA, int LowerA, int UpperA, DiffData DataB, int LowerB, int UpperB) { + // Debug.Write(2, "LCS", String.Format("Analyse the box: A[{0}-{1}] to B[{2}-{3}]", LowerA, UpperA, LowerB, UpperB)); + + // Fast walkthrough equal lines at the start + while (LowerA < UpperA && LowerB < UpperB && DataA.data[LowerA] == DataB.data[LowerB]) { + LowerA++; LowerB++; + } + + // Fast walkthrough equal lines at the end + while (LowerA < UpperA && LowerB < UpperB && DataA.data[UpperA-1] == DataB.data[UpperB-1]) { + --UpperA; --UpperB; + } + + if (LowerA == UpperA) { + // mark as inserted lines. + while (LowerB < UpperB) + DataB.modified[LowerB++] = true; + + } else if (LowerB == UpperB) { + // mark as deleted lines. + while (LowerA < UpperA) + DataA.modified[LowerA++] = true; + + } else { + // Find the middle snakea and length of an optimal path for A and B + SMSRD smsrd = SMS(DataA, LowerA, UpperA, DataB, LowerB, UpperB); + // Debug.Write(2, "MiddleSnakeData", String.Format("{0},{1}", smsrd.x, smsrd.y)); + + // The path is from LowerX to (x,y) and (x,y) ot UpperX + LCS(DataA, LowerA, smsrd.x, DataB, LowerB, smsrd.y); + LCS(DataA, smsrd.x, UpperA, DataB, smsrd.y, UpperB); // 2002.09.20: no need for 2 points + } + } // LCS() + + + /// Scan the tables of which lines are inserted and deleted, + /// producing an edit script in forward order. + /// + /// dynamic array + private static Item[] CreateDiffs(DiffData DataA, DiffData DataB) { + ArrayList a = new ArrayList(); + Item aItem; + Item []result; + + int StartA, StartB; + int LineA, LineB; + + LineA = 0; + LineB = 0; + while (LineA < DataA.Length || LineB < DataB.Length) { + if ((LineA < DataA.Length) && (! DataA.modified[LineA]) + && (LineB < DataB.Length) && (! DataB.modified[LineB])) { + // equal lines + LineA++; + LineB++; + + } else { + // maybe deleted and/or inserted lines + StartA = LineA; + StartB = LineB; + + while (LineA < DataA.Length && (LineB >= DataB.Length || DataA.modified[LineA])) + // while (LineA < DataA.Length && DataA.modified[LineA]) + LineA++; + + while (LineB < DataB.Length && (LineA >= DataA.Length || DataB.modified[LineB])) + // while (LineB < DataB.Length && DataB.modified[LineB]) + LineB++; + + if ((StartA < LineA) || (StartB < LineB)) { + // store a new difference-item + aItem = new Item(); + aItem.StartA = StartA; + aItem.StartB = StartB; + aItem.deletedA = LineA - StartA; + aItem.insertedB = LineB - StartB; + a.Add(aItem); + } // if + } // if + } // while + + result = new Item[a.Count]; + a.CopyTo(result); + + return (result); + } + + } // class Diff + + /// Data on one input file being compared. + /// + internal class DiffData { + + /// Number of elements (lines). + internal int Length; + + /// Buffer of numbers that will be compared. + internal int[] data; + + /// + /// Array of booleans that flag for modified data. + /// This is the result of the diff. + /// This means deletedA in the first Data or inserted in the second Data. + /// + internal bool[] modified; + + /// + /// Initialize the Diff-Data buffer. + /// + /// reference to the buffer + internal DiffData(int[] initData) { + data = initData; + Length = initData.Length; + modified = new bool[Length + 2]; + } // DiffData + + } // class DiffData + +} // namespace \ No newline at end of file diff --git a/MSGerTextBox/Form1.Designer.cs b/MSGerTextBox/Form1.Designer.cs new file mode 100644 index 0000000..5f6f802 --- /dev/null +++ b/MSGerTextBox/Form1.Designer.cs @@ -0,0 +1,72 @@ +namespace SzNPProjects.TextBox +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.msGerTextBox1 = new SzNPProjects.TextBox.MSGerTextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // msGerTextBox1 + // + this.msGerTextBox1.BackColor = System.Drawing.Color.White; + this.msGerTextBox1.Location = new System.Drawing.Point(12, 38); + this.msGerTextBox1.Name = "msGerTextBox1"; + this.msGerTextBox1.Size = new System.Drawing.Size(523, 115); + this.msGerTextBox1.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(370, 170); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 1; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(631, 228); + this.Controls.Add(this.button1); + this.Controls.Add(this.msGerTextBox1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private MSGerTextBox msGerTextBox1; + private System.Windows.Forms.Button button1; + } +} + diff --git a/MSGerTextBox/Form1.cs b/MSGerTextBox/Form1.cs new file mode 100644 index 0000000..2871ae9 --- /dev/null +++ b/MSGerTextBox/Form1.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SzNPProjects.TextBox +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + msGerTextBox1.ResetText(); + msGerTextBox1.Text = ""; + } + } +} diff --git a/MSGerTextBox/Form1.resx b/MSGerTextBox/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MSGerTextBox/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MSGerTextBox/MSGerTextBox.Designer.cs b/MSGerTextBox/MSGerTextBox.Designer.cs new file mode 100644 index 0000000..52a4e47 --- /dev/null +++ b/MSGerTextBox/MSGerTextBox.Designer.cs @@ -0,0 +1,60 @@ +namespace SzNPProjects.TextBox +{ + partial class MSGerTextBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(519, 111); + this.panel1.TabIndex = 0; + // + // MSGerTextBox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; + this.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.Controls.Add(this.panel1); + this.Name = "MSGerTextBox"; + this.Size = new System.Drawing.Size(519, 111); + this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.MSGerTextBox_KeyPress); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + } +} diff --git a/MSGerTextBox/MSGerTextBox.cs b/MSGerTextBox/MSGerTextBox.cs new file mode 100644 index 0000000..88470df --- /dev/null +++ b/MSGerTextBox/MSGerTextBox.cs @@ -0,0 +1,290 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using my.utils; +using System.Drawing.Drawing2D; + +namespace SzNPProjects.TextBox +{ + public partial class MSGerTextBox : UserControl + { //2015.06.06. - TO!DO: Kurzor megjelenítése, tulajdonságok kezelése (Font), képek kezelése + private LineRenderer linerenderer; //2015.06.10. + public MSGerTextBox() + { //TO!DO: WordWrap + InitializeComponent(); + Lines.Add(""); + linerenderer = new LineRenderer(panel1); //2015.06.10. + panel1.Paint += OnPanelPaint; //2015.06.10. + CursorRendererTimer.Tick += OnCursorRender; //2015.06.11. + CursorRendererTimer.Interval = SystemInformation.CaretBlinkTime; //2015.06.11. + CursorRendererTimer.Start(); //2015.06.11. + } + + public override string Text + { + get + { + return Lines.Aggregate((entry1, entry2) => entry1 + "\n" + entry2); + } + set + { + var results = Diff.DiffText(Lines.Aggregate((entry1, entry2) => entry1 + "\n" + entry2), value, false, false, false); + List changedlines = new List(); + string[] vlines = value.Split(new char[] { '\n', '\r' }); //Itt az Enter-t \r jelzi + if (vlines.Length > Lines.Count) + lines.Add(""); + for (int i = 0; i < results.Length; i++) + { + var result = results[i]; + if (result.deletedA > result.insertedB) + lines.RemoveAt(result.StartA); + if (result.StartA >= 0 && result.StartA < Lines.Count && result.StartB >= 0 && result.StartB < vlines.Length) //<-- 2015.06.10. + Lines[result.StartA] = vlines[result.StartB]; + } + //RefreshControls(changedlines); //TODO: Event handler-eket a BindingList-hoz, és ezt átrakni oda + //linerenderer.Render(); //2015.06.10. + //this.Refresh(); //2015.06.10. + panel1.Text = this.Text; //2015.06.10. + panel1.Refresh(); //2015.06.10. + } + } + + private BindingList lines = new BindingList(); + public BindingList Lines + { + get + { + return lines; + } + set + { + lines = value; + //RefreshControls(new int[] { }); + this.Refresh(); //2015.06.10. + } + } + + //public int CursorPosition { get; set; } + private int currentline; + public int CurrentLine + { + get + { + return currentline; + } + set + { + if (value >= Lines.Count) + Lines.Add(""); + currentline = value; + } + } + + private bool wordwrap; //2015.06.11. + public bool WordWrap + { //2015.06.11. + get + { + return wordwrap; + } + set + { + wordwrap = value; + panel1.Refresh(); + } + } + + private int cursorposition; //2015.06.11. + public int CursorPosition + { //2015.06.11. + get + { + return cursorposition; + } + set + { + cursorposition = value; + panel1.Refresh(); + } + } + + public Dictionary Emoticons = new Dictionary(); + + /*private List