Ejemplo n.º 1
0
        private void cmdAddGroup_Click(object sender, EventArgs e)
        {
            frmGroup newGroup = new frmGroup(this);

            newGroup.Show();
            newGroup.BringToFront();
        }
Ejemplo n.º 2
0
        public frmClient(List <string> arguments)
        {
            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
            {
                string resourceName = new AssemblyName(args.Name).Name + ".dll";
                string resource     = Array.Find(this.GetType().Assembly.GetManifestResourceNames(), element => element.EndsWith(resourceName));

                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resource))
                {
                    Byte[] assemblyData = new Byte[stream.Length];
                    stream.Read(assemblyData, 0, assemblyData.Length);
                    return(Assembly.Load(assemblyData));
                }
            };

            System.Runtime.ProfileOptimization.StartProfile("frmClient.Profile");
            InitializeComponent();
            this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
            Reload();

            currentVersion.Text = "v" + System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString();

            githubVersion.Text = Task.Run(() => getVersionData()).Result;

            if (arguments.Count > 2 && arguments[1] == "editingGroupMode" && Directory.Exists(Path.Combine(Paths.ConfigPath, arguments[2])))
            {
                try
                {
                    frmGroup editGroup = new frmGroup(this, categoryList.Where(cat => cat.Name == arguments[2]).First());
                    editGroup.TopMost = true;
                    editGroup.Show();
                }
                catch { }
            }

            if (Settings.settingInfo.portableMode)
            {
                portabilityButton.Tag   = "y";
                portabilityButton.Image = Properties.Resources.toggleOn;
            }
            else
            {
                portabilityButton.Tag   = "n";
                portabilityButton.Image = Properties.Resources.toggleOff;
            }

            if (Paths.justWritten)
            {
                changeAllShortcuts();
            }
        }