Exemplo n.º 1
0
        private void AddAppButton_Click(object sender, RoutedEventArgs e)
        {
            bool isExist = false;

            MainCore.AppList.ForEach(x =>
            {
                if (x.WindowName == NewWindowTextBox.Text)
                {
                    isExist = true;
                }
            });

            if (isExist == false)
            {
                AppData d = new AppData
                {
                    WindowName = NewWindowTextBox.Text,
                    url        = JumpUrlTexBox.Text
                };

                MainCore.AppList.Add(d);
            }
            else
            {
                foreach (AppData x in MainCore.AppList)
                {
                    if (x.WindowName == NewWindowTextBox.Text)
                    {
                        x.url = JumpUrlTexBox.Text;
                    }
                }
            }
            NewWindowTextBox.Text = "";
            JumpUrlTexBox.Text    = "";
            WindowList.Items.Refresh();
            MainCore.SaveConfig();
        }
Exemplo n.º 2
0
 private void ExitButton_Click(object sender, EventArgs e)
 {
     // 現在のアプリケーションを終了
     MainCore.SaveConfig();
     Application.Current.Shutdown();
 }