private void DisplayAboutWindow(object obj)
 {
     if (aboutWindow != null)
     {
         aboutWindow.Close();
     }
     aboutWindow = new AboutWindow();
     aboutWindow.Show();
 }
Esempio n. 2
0
    void OnDestroy()
    {
        if (toolWindow != null)
        {
            toolWindow.Close();
        }

        if (fsmSelectorWindow != null)
        {
            fsmSelectorWindow.Close();
        }

        if (fsmTemplateWindow != null)
        {
            fsmTemplateWindow.Close();
        }

        if (stateSelectorWindow != null)
        {
            stateSelectorWindow.Close();
        }

        if (actionWindow != null)
        {
            actionWindow.Close();
        }

        if (globalVariablesWindow != null)
        {
            globalVariablesWindow.Close();
        }

        if (globalEventsWindow != null)
        {
            globalEventsWindow.Close();
        }

        if (errorWindow != null)
        {
            errorWindow.Close();
        }

        if (logWindow != null)
        {
            logWindow.Close();
        }

        if (reportWindow != null)
        {
            reportWindow.Close();
        }

        if (aboutWindow != null)
        {
            aboutWindow.Close();
        }
    }
Esempio n. 3
0
    public void OnDestroy()
    {
        if (toolWindow != null)
        {
            toolWindow.Close();
        }

        if (fsmSelectorWindow != null)
        {
            fsmSelectorWindow.Close();
        }

        if (fsmTemplateWindow != null)
        {
            fsmTemplateWindow.Close();
        }

        if (stateSelectorWindow != null)
        {
            stateSelectorWindow.Close();
        }

        if (actionWindow != null)
        {
            actionWindow.Close();
        }

        if (errorWindow != null)
        {
            errorWindow.Close();
        }

        if (logWindow != null)
        {
            logWindow.Close();
        }

        if (aboutWindow != null)
        {
            aboutWindow.Close();
        }
    }
Esempio n. 4
0
        void MessageReceived(NotificationMessage notificationMessage)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                if (notificationMessage.Notification == Messages.ShowWaitWindowLoading)
                {
                    if (waitWindow != null)
                    {
                        waitWindow.Close();
                    }

                    waitWindow = new WaitWindow("Loading please wait...")
                    {
                        Owner = this
                    };

                    waitWindow.Closed += (sender, e) => viewModel.CancelLoading();

                    waitWindow.ShowDialog();
                }
                else if (notificationMessage.Notification == Messages.ShowWaitWindowSaving)
                {
                    if (waitWindow != null)
                    {
                        waitWindow.Close();
                    }

                    waitWindow = new WaitWindow("Saving please wait...")
                    {
                        Owner = this
                    };

                    waitWindow.Closed += (sender, e) => viewModel.CancelLoading();

                    waitWindow.ShowDialog();
                }
                else if (notificationMessage.Notification == Messages.ShowAboutWindow)
                {
                    if (aboutWindow != null)
                    {
                        aboutWindow.Close();
                    }

                    aboutWindow = new AboutWindow(viewModel.GetApplicationInformation().ProductName)
                    {
                        DataContext = notificationMessage.Target,
                        Owner       = this
                    };
                    aboutWindow.ShowDialog();
                }

                else if (notificationMessage.Notification == Messages.ShowSettings)
                {
                    if (settingsWindow != null)
                    {
                        settingsWindow.Close();
                    }

                    settingsWindow = new SettingsWindow
                    {
                        DataContext = notificationMessage.Target,
                        Owner       = this
                    };
                    settingsWindow.ShowDialog();
                }
                else if (notificationMessage.Notification == Messages.DismissWaitWindow)
                {
                    if (waitWindow != null)
                    {
                        waitWindow.Close();
                        waitWindow = null;
                    }
                }
                else if (notificationMessage.Notification == Messages.DismissSettingsWindow)
                {
                    if (settingsWindow != null)
                    {
                        settingsWindow.Close();
                        settingsWindow = null;
                    }
                }
                else if (notificationMessage.Notification == Messages.ReValidateAllRows)
                {
                    RevalidateAllRows();
                }
                else if (notificationMessage.Notification == Messages.RefreshDataGridRowNumbers)
                {
                    CustumerDataGrid.Items.Refresh();
                }
            }));
        }