Exemplo n.º 1
0
        public static void Close(ViewModelBase viewModel)
        {
            if (openWindows.Contains(viewModel))
            {
                openWindows.Remove(viewModel);
            }
            else if (openDialogs.Contains(viewModel))
            {
                openDialogs.Remove(viewModel);
            }

            WindowLauncher.CloseWindow(viewModel);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            bool didLaunchWindow = WindowLauncher.LaunchWindowFromStartupArguments(args);

            if (didLaunchWindow == false)
            {
                Application.Run(new View.Main.PackageBossMainForm());
            }
            //else
            //{
            //    Application.Run();
            //}
        }
Exemplo n.º 3
0
        void InitFold()
        {
            launcher = new WindowLauncher("WindowLauncher");

            // add funcion
            launcher.Add(() => GUILayout.Label("Added function"));

            // add function with checkEnableFunc
            // Called only when checkEnableFunc returns true.
            launcher.Add(
                () => isEnable,
                () => GUILayout.Label("With checkEnableFunc.")
                );

            // add title label action
            launcher.SetTitleAction(() => GUILayout.Label("Title Action"));
        }
Exemplo n.º 4
0
 public static void OpenDialog(ViewModelBase viewModel, ViewModelBase owner)
 {
     openDialogs.Add(viewModel);
     WindowLauncher.OpenDialog(viewModel, owner);
 }
Exemplo n.º 5
0
 public PackageBossMainForm()
 {
     InitializeComponent();
     _presenter      = new Presenter.Main.PackageDataGridPresenter(this);
     _windowLauncher = new WindowLauncher();
 }