コード例 #1
0
        public override bool Action(string action)
        {
            bool result = base.Action(action);

            if (result)
            {
                if (UIChildWindowForm != null)
                {
                    if (action == ACTION_SHOW)
                    {
                        if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, false))
                        {
                            if (!UIChildWindowForm.Visible)
                            {
                                UIChildWindowForm.Show();
                            }
                            if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
                            {
                                UIChildWindowForm.WindowState = FormWindowState.Normal;
                            }
                            UIChildWindowForm.BringToFront();
                        }
                    }
                }
                result = true;
            }
            return(result);
        }
コード例 #2
0
ファイル: Editor.cs プロジェクト: pheijmans-zz/GAPP
        public override bool Action(string action)
        {
            bool result = base.Action(action);

            if (result)
            {
                if (UIChildWindowForm != null)
                {
                    if (action == ACTION_SHOW)
                    {
                        if (!UIChildWindowForm.Visible)
                        {
                            (UIChildWindowForm as EditorForm).UpdateView();
                            UIChildWindowForm.Show();
                        }
                        if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
                        {
                            UIChildWindowForm.WindowState = FormWindowState.Normal;
                        }
                        UIChildWindowForm.BringToFront();
                    }
                }
                result = true;
            }
            return(result);
        }
コード例 #3
0
        public override bool Action(string action)
        {
            bool result = base.Action(action);

            if (result)
            {
                if (UIChildWindowForm != null)
                {
                    if (action == ACTION_SHOW)
                    {
                        if (!UIChildWindowForm.Visible)
                        {
                            UIChildWindowForm.Show();
                        }
                        if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
                        {
                            UIChildWindowForm.WindowState = FormWindowState.Normal;
                        }
                        UIChildWindowForm.BringToFront();
                    }
                    else
                    {
                        (UIChildWindowForm as QueryBuilderForm).ExecuteQuery(action.Substring(action.IndexOf('|') + 1));
                    }
                }
                result = true;
            }
            return(result);
        }
コード例 #4
0
        public async override Task <bool> ActionAsync(string action)
        {
            bool result = base.Action(action);

            if (result)
            {
                if (UIChildWindowForm != null)
                {
                    if (action == ACTION_EDIT)
                    {
                        if (!UIChildWindowForm.Visible)
                        {
                            UIChildWindowForm.Show();
                        }
                        if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
                        {
                            UIChildWindowForm.WindowState = FormWindowState.Normal;
                        }
                        UIChildWindowForm.BringToFront();
                    }
                    else
                    {
                        int pos = action.IndexOf('|');
                        if (pos > 0)
                        {
                            await(UIChildWindowForm as ActionListForm).Execute(action.Substring(pos + 1));
                        }
                    }
                }
            }
            return(result);
        }
コード例 #5
0
ファイル: BrowserPlugin.cs プロジェクト: pheijmans-zz/GAPP
 public void OpenNewBrowser(string url)
 {
     if (UIChildWindowForm != null)
     {
         if (!UIChildWindowForm.Visible)
         {
             UIChildWindowForm.Show();
             (UIChildWindowForm as WebbrowserForm).UpdateView();
         }
         if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
         {
             UIChildWindowForm.WindowState = FormWindowState.Normal;
         }
         UIChildWindowForm.BringToFront();
         (UIChildWindowForm as WebbrowserForm).OpenNewBrowser(url);
     }
 }
コード例 #6
0
        public override bool Action(string action)
        {
            bool result = base.Action(action);

            if (result)
            {
                if (UIChildWindowForm != null)
                {
                    if (action == ACTION_SHOW)
                    {
                        if (!UIChildWindowForm.Visible)
                        {
                            UIChildWindowForm.Show();
                        }
                        if (UIChildWindowForm.WindowState == FormWindowState.Minimized)
                        {
                            UIChildWindowForm.WindowState = FormWindowState.Normal;
                        }
                        UIChildWindowForm.BringToFront();
                    }
                    if (action == ACTION_DOWNLOADANDPUBLISH)
                    {
                        if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, false))
                        {
                            using (ServerConnectionForm dlg = new ServerConnectionForm(this, Core))
                            {
                                dlg.ShowDialog();
                            }
                        }
                    }
                    else
                    {
                        (UIChildWindowForm as ActionBuilderForm).RunActionFlow(action.Substring(action.IndexOf('|') + 1), true);
                    }
                }
                result = true;
            }
            return(result);
        }
コード例 #7
0
ファイル: GMapForm.cs プロジェクト: pheijmans-zz/GAPP
 public override bool ApplySettings(List <System.Windows.Forms.UserControl> configPanels)
 {
     foreach (System.Windows.Forms.UserControl uc in configPanels)
     {
         if (uc is SettingsPanel)
         {
             (uc as SettingsPanel).Apply();
             if ((uc as SettingsPanel).SettingsChanged)
             {
                 if (UIChildWindowForm != null)
                 {
                     if (UIChildWindowForm.Visible)
                     {
                         UIChildWindowForm.Show();
                         (UIChildWindowForm as GMapForm).UpdateView(GMapForm.MapUpdateReason.MapSettingsChanged);
                     }
                 }
             }
             break;
         }
     }
     return(true);
 }