Exemplo n.º 1
0
        private void Window_Presentation_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (data.SaveOutput)
            {
                output.W = data.CanvasW;
                output.H = data.CanvasH;

                if (!String.IsNullOrWhiteSpace(Good_Teacher.MainWindow.pathtofile))
                {
                    SaveOutputData();
                    SaveEditor saveEditor = new SaveEditor();

                    string dirp = System.IO.Path.GetDirectoryName(Good_Teacher.MainWindow.pathtofile);
                    Directory.CreateDirectory(dirp + "\\GT_Output\\");
                    saveEditor.SaveWithCompressionO(dirp + "\\GT_Output\\GT_" + DateTime.Now.Year + "_" + DateTime.Now.Month.ToString("00") + "_" + DateTime.Now.Day + "__" + DateTime.Now.Hour.ToString("00") + "_" + DateTime.Now.Minute.ToString("00") + ".gtout", output);
                }
            }

            mediaplayer.Stop();

            dispatcherTimer_Timers.Stop();
            dispatcherTimer_Timers.IsEnabled = false;

            FontWorker.RemoveTemporaryFolder();
        }
Exemplo n.º 2
0
        private void MenuItem_New_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult messageBoxResult = MessageBox.Show(Strings.ResStrings.NewProject, Strings.ResStrings.New, System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                BorderWindowSize.Visibility = Visibility.Collapsed;
                HistoryRedo.Clear();
                HistoryUndo.Clear();
                SelectedPosition    = -1;
                SelectedControl     = null;
                ValueEditor.Content = "";
                data = new DataStore();
                RemoveUnloadEvent();
                DesignCanvas.Children.Clear();
                Stack_TestList.Children.Clear();
                DesignCanvas.Background = new SolidColorBrush(Colors.White);
                pathtofile              = "";
                BorderWindowSize.Width  = 1282;
                BorderWindowSize.Height = 722;
                L_FileName.Content      = "";
                FontWorker.RemoveTemporaryFolder();
                MainWindow.IsChanged = false;
            }
        }
Exemplo n.º 3
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            CheckState();
            ((FrameworkElement)Toolbar_Main.Template.FindName("OverflowGrid", Toolbar_Main)).Visibility = Visibility.Collapsed;
            //PreviewKeyDown += MainWindow_KeyDown;

            BorderWindowSize.Visibility = Visibility.Collapsed;

            timer          = new DispatcherTimer();
            timer.Tick    += new EventHandler(Timer_Tick);
            timer.Interval = new TimeSpan(0, 0, 0, 5);
            timer.Start();

            FontWorker.RemoveTemporaryFolder();

            TempFilesWorker.RemoveUpdateFolder();

            if (OpenFileARG)
            {
                OpenFile(OpenFileARGPath);
            }
        }
Exemplo n.º 4
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     FontWorker.RemoveTemporaryFolder();
 }