private void PrintMethod()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            DS ds = new DS();

            ds.RequiredCategory.Rows.Clear();
            int i = 0;

            foreach (var item in categories.Where(w => w.RequiredQty > 0))
            {
                ds.RequiredCategory.Rows.Add();
                ds.RequiredCategory[i]["Serial"]   = i + 1;
                ds.RequiredCategory[i]["Category"] = item.Category + " " + item.Company;
                ds.RequiredCategory[i]["Required"] = item.RequiredQty;
                i++;
            }
            ReportWindow           rpt = new ReportWindow();
            RequiredCategoryReport requiredCategoryRPT = new RequiredCategoryReport();

            requiredCategoryRPT.SetDataSource(ds.Tables["RequiredCategory"]);
            rpt.crv.ViewerCore.ReportSource = requiredCategoryRPT;
            Mouse.OverrideCursor            = null;
            rpt.ShowDialog();

            //requiredCategoryRPT.PrintOptions.PrinterName = _selectedPrinter;
            //requiredCategoryRPT.PrintToPrinter(1, true, 0, 0);
        }
Exemple #2
0
        private void sendReport()
        {
            List <Bitmap> AllImages = new List <Bitmap>();

            AllImages.Add(Helper.CaptureAllCategories(true));

            var count = CategoryDataGrid.Items.Count;

            if (CategoryDataGrid.Items.Count > 20)
            {
                count = count - 20;
                for (int i = 0; i < 20; i++)
                {
                    _categoriesTable.Rows[0].Delete();
                }

                report = new ReportWindow(_categoriesTable, AllImages, count);
                report.Show();

                aTimer = new System.Timers.Timer(2000);
                // Hook up the Elapsed event for the timer.
                aTimer.Elapsed  += OnTimedEvent;
                aTimer.AutoReset = true;
                aTimer.Enabled   = true;

                var test = report.AllImages;
            }
        }
        private ReportWindow GetReportView()
        {
            ReportWindow     view      = new ReportWindow();
            CReportViewModel viewModel = new CReportViewModel(this, _storageService, view);

            return(view);
        }
Exemple #4
0
        private void PrintMethod()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            DS ds = new DS();

            ds.Sale.Rows.Clear();
            int i = 0;

            foreach (var item in _supplyOfferCategories)
            {
                ds.Sale.Rows.Add();
                ds.Sale[i]["Client"]     = _selectedSupplyOffer.Client.Name;
                ds.Sale[i]["Serial"]     = i + 1;
                ds.Sale[i]["Category"]   = item.Category + " " + item.Company;
                ds.Sale[i]["Qty"]        = item.Qty;
                ds.Sale[i]["Price"]      = Math.Round(Convert.ToDecimal(item.CostAfterTax), 2);
                ds.Sale[i]["TotalPrice"] = Math.Round(Convert.ToDecimal(item.CostTotalAfterTax), 2);
                ds.Sale[i]["BillPrice"]  = Math.Round(Convert.ToDecimal(_selectedSupplyOffer.CostAfterTax), 2);
                i++;
            }
            ReportWindow      rpt            = new ReportWindow();
            SupplyOfferReport supplyOfferRPT = new SupplyOfferReport();

            supplyOfferRPT.SetDataSource(ds.Tables["Sale"]);
            rpt.crv.ViewerCore.ReportSource = supplyOfferRPT;
            Mouse.OverrideCursor            = null;
            _currentWindow.Hide();
            rpt.ShowDialog();
            _currentWindow.ShowDialog();
        }
Exemple #5
0
    private void on_delete_event(object o, DeleteEventArgs args)
    {
        recordData();

        ReportWindowBox.report_window.Hide();
        ReportWindowBox = null;
    }
Exemple #6
0
        //Открыть форму с отчетом
        private void OpenReport(object parameter)
        {
            var win = new ReportWindow();

            win.Show();
            // CloseWindow();
        }
        private void PrintMethod()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            DS ds = new DS();

            ds.RequiredCategory.Rows.Clear();
            int i = 0;

            foreach (var item in _categoryServ.GetAllRequiredCategories().Where(w => w.RequiredQty > 0))
            {
                ds.RequiredCategory.Rows.Add();
                ds.RequiredCategory[i]["Serial"]   = i + 1;
                ds.RequiredCategory[i]["Company"]  = item.Company;
                ds.RequiredCategory[i]["Category"] = item.Category;
                //ds.RequiredCategory[i]["Cost"] = item.Cost;
                //ds.RequiredCategory[i]["Qty"] = item.Qty;
                ds.RequiredCategory[i]["Required"] = item.RequiredQty;
                i++;
            }
            ReportWindow           rpt = new ReportWindow();
            RequiredCategoryReport requiredCategoryRPT = new RequiredCategoryReport();

            requiredCategoryRPT.SetDataSource(ds.Tables["RequiredCategory"]);
            rpt.crv.ViewerCore.ReportSource = requiredCategoryRPT;
            Mouse.OverrideCursor            = null;
            rpt.ShowDialog();
        }
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            ImusCityHallEntities db          = new ImusCityHallEntities();
            CDSSignatory         signatories = db.CDSSignatories.FirstOrDefault();

            if (voucherlistdg.SelectedValue == null)
            {
                Mouse.OverrideCursor = null;
                MessageBox.Show("Please select an item");
            }
            else if (signatories == null)
            {
                Mouse.OverrideCursor = null;
                MessageBox.Show("Please add report signatories");
            }
            else if (signatories.CityAccountant.Equals(null) || signatories.CityTreasurer.Equals(null) || signatories.CityAdministrator.Equals(null))
            {
                Mouse.OverrideCursor = null;
                MessageBox.Show("Please add report signatories");
            }
            else
            {
                ReportWindow report = new ReportWindow();
                report.id    = (int)voucherlistdg.SelectedValue;
                App.ReportID = 1;
                report.Show();
                Mouse.OverrideCursor = null;
            }
            Mouse.OverrideCursor = null;
        }
        private void Report_Click(object sender, RoutedEventArgs e)
        {
            ReportWindow reportWindow = new ReportWindow();

            reportWindow.Show();
            this.Close();
        }
Exemple #10
0
        protected void gameSubmissionDone(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Cancelled)
            {
                this.enableInterface();
                return;
            }

            ReportWindow report = new ReportWindow(analyzer, this);

            report.ShowDialog();
            if (report.SentOrSaved)
            {
                analyzer.game.Submitted = true;
                Games.saveCustomGames();
            }
            if (askAboutGame())
            {
                return;
            }

            submitGame.IsEnabled = Games.HasUnsubmittedGames;

            this.enableInterface();
        }
Exemple #11
0
    //if it's created
    static public ReportWindow Show(Gtk.Window parent, Report report)
    {
        if (ReportWindowBox == null)
        {
            ReportWindowBox = new ReportWindow(parent, report);

            //checkboxes
            ReportWindowBox.loadCheckBoxes();

            ReportWindowBox.FillTreeView();

            ReportWindowBox.report_window.Show();
        }
        else
        {
            //update all widget only if it's hidden
            if (!ReportWindowBox.report_window.Visible)
            {
                //checkboxes
                ReportWindowBox.loadCheckBoxes();

                ReportWindowBox.FillTreeView();

                ReportWindowBox.report_window.Show();
            }
        }

        return(ReportWindowBox);
    }
 public DayReportViewModel(TagViewModel model, List <ActivityLine> data)
 {
     this.model = model;
     this.data  = data;
     view       = new ReportWindow();
     view.Report.DataContext = model;
     view.DataContext        = this;
 }
        private void ExecuteSave()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            DateTime _dt = DateTime.Now;

            _saleOfferServ.AddSaleOffer(_newSaleOffer);
            int _saleOfferID = _saleOfferServ.GetLastSaleOfferID();

            foreach (var item in _saleOfferCategories)
            {
                SaleOfferCategory _saleOfferCategory = new SaleOfferCategory
                {
                    CategoryID              = item.CategoryID,
                    PriceAfterDiscount      = item.PriceAfterDiscount,
                    PriceTotalAfterDiscount = item.PriceTotalAfterDiscount,
                    Price              = item.Price,
                    PriceTotal         = item.PriceTotal,
                    Discount           = item.Discount,
                    DiscountValue      = item.DiscountValue,
                    DiscountValueTotal = item.DiscountValueTotal,
                    SaleOfferID        = _saleOfferID,
                    Qty = item.Qty
                };
                _saleOfferCategoryServ.AddSaleOfferCategory(_saleOfferCategory);
            }

            DS ds = new DS();

            ds.Sale.Rows.Clear();
            int i = 0;

            foreach (var item in _saleOfferCategories)
            {
                ds.Sale.Rows.Add();
                ds.Sale[i]["Client"]     = _selectedClient.Name;
                ds.Sale[i]["Serial"]     = i + 1;
                ds.Sale[i]["Category"]   = item.Category + " " + item.Company;
                ds.Sale[i]["Qty"]        = item.Qty;
                ds.Sale[i]["Price"]      = Math.Round(Convert.ToDecimal(item.PriceAfterDiscount), 2);
                ds.Sale[i]["TotalPrice"] = Math.Round(Convert.ToDecimal(item.PriceTotalAfterDiscount), 2);
                ds.Sale[i]["BillPrice"]  = Math.Round(Convert.ToDecimal(_newSaleOffer.PriceAfterDiscount), 2);;
                i++;
            }
            ReportWindow    rpt          = new ReportWindow();
            SaleOfferReport saleOfferRPT = new SaleOfferReport();

            saleOfferRPT.SetDataSource(ds.Tables["Sale"]);
            rpt.crv.ViewerCore.ReportSource = saleOfferRPT;
            Mouse.OverrideCursor            = null;
            _currentWindow.Hide();
            rpt.ShowDialog();
            NewSaleOffer         = new SaleOffer();
            NewSaleOfferCategory = new SaleOfferCategoryVM();
            SaleOfferCategories  = new ObservableCollection <SaleOfferCategoryVM>();
            NewSaleOffer.Date    = DateTime.Now;
            OldPrices            = new ObservableCollection <SaleCategory>();
            _currentWindow.ShowDialog();
        }
Exemple #14
0
        private void PrintMethod()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            DS ds = new DS();

            ds.ClientAccount.Rows.Clear();
            int i = 0;

            foreach (var item in _clientAccounts)
            {
                ds.ClientAccount.Rows.Add();
                ds.ClientAccount[i]["Serial"]        = i + 1;
                ds.ClientAccount[i]["Client"]        = _selectedClient.Name;
                ds.ClientAccount[i]["DateFrom"]      = _dateFrom;
                ds.ClientAccount[i]["DateTo"]        = _dateTo;
                ds.ClientAccount[i]["Date"]          = item.Date;
                ds.ClientAccount[i]["Statement"]     = item.Statement;
                ds.ClientAccount[i]["Debit"]         = item.Debit;
                ds.ClientAccount[i]["Credit"]        = item.Credit;
                ds.ClientAccount[i]["TotalDebit"]    = _selectedClientAccount.TotalDebit;
                ds.ClientAccount[i]["TotalCredit"]   = _selectedClientAccount.TotalCredit;
                ds.ClientAccount[i]["DuringAccount"] = Math.Abs(Convert.ToDecimal(_selectedClientAccount.DuringAccount));
                if (_selectedClientAccount.DuringAccount > 0)
                {
                    ds.ClientAccount[i]["DuringAccountType"] = "له";
                }
                else if (_selectedClientAccount.DuringAccount < 0)
                {
                    ds.ClientAccount[i]["DuringAccountType"] = "عليه";
                }
                ds.ClientAccount[i]["NotDuringAccount"] = Math.Abs(Convert.ToDecimal(_selectedClientAccount.OldAccount));
                if (_selectedClientAccount.OldAccount > 0)
                {
                    ds.ClientAccount[i]["NotDuringAccountType"] = "له";
                }
                else if (_selectedClientAccount.OldAccount < 0)
                {
                    ds.ClientAccount[i]["NotDuringAccountType"] = "عليه";
                }
                ds.ClientAccount[i]["CurrentAccount"] = Math.Abs(Convert.ToDecimal(_selectedClientAccount.CurrentAccount));
                if (_selectedClientAccount.CurrentAccount > 0)
                {
                    ds.ClientAccount[i]["CurrentAccountType"] = "له";
                }
                else if (_selectedClientAccount.CurrentAccount < 0)
                {
                    ds.ClientAccount[i]["CurrentAccountType"] = "عليه";
                }
                i++;
            }
            ReportWindow        rpt = new ReportWindow();
            ClientAccountReport accountClientRPT = new ClientAccountReport();

            accountClientRPT.SetDataSource(ds.Tables["ClientAccount"]);
            rpt.crv.ViewerCore.ReportSource = accountClientRPT;
            Mouse.OverrideCursor            = null;
            rpt.ShowDialog();
        }
        private void ExecuteSaveAsync()
        {
            Mouse.OverrideCursor        = Cursors.Wait;
            _selectedSupplyOffer.Client = _selectedClient;
            _supplyOfferServ.UpdateSupplyOffer(_selectedSupplyOffer);
            _supplyOfferCategoryServ.DeleteSupplyOfferCategories(ID);

            foreach (var item in _supplyOfferCategories)
            {
                SupplyOfferCategory _supplyOfferCategory = new SupplyOfferCategory
                {
                    CategoryID             = item.CategoryID,
                    Cost                   = item.Cost,
                    CostAfterDiscount      = item.CostAfterDiscount,
                    CostAfterTax           = item.CostAfterTax,
                    CostTotal              = item.CostTotal,
                    CostTotalAfterDiscount = item.CostTotalAfterDiscount,
                    CostTotalAfterTax      = item.CostTotalAfterTax,
                    Discount               = item.Discount,
                    DiscountValue          = item.DiscountValue,
                    DiscountValueTotal     = item.DiscountValueTotal,
                    SupplyOfferID          = ID,
                    Qty           = item.Qty,
                    Tax           = item.Tax,
                    TaxValue      = item.TaxValue,
                    TaxValueTotal = item.TaxValueTotal
                };
                _supplyOfferCategoryServ.AddSupplyOfferCategory(_supplyOfferCategory);
            }

            DS ds = new DS();

            ds.Sale.Rows.Clear();
            int i = 0;

            foreach (var item in _supplyOfferCategories)
            {
                ds.Sale.Rows.Add();
                ds.Sale[i]["Client"]     = _selectedClient.Name;
                ds.Sale[i]["Serial"]     = i + 1;
                ds.Sale[i]["Category"]   = item.Category + " " + item.Company;
                ds.Sale[i]["Qty"]        = item.Qty;
                ds.Sale[i]["Price"]      = Math.Round(Convert.ToDecimal(item.CostAfterTax), 2);
                ds.Sale[i]["TotalPrice"] = Math.Round(Convert.ToDecimal(item.CostTotalAfterTax), 2);
                ds.Sale[i]["BillPrice"]  = Math.Round(Convert.ToDecimal(_selectedSupplyOffer.CostAfterTax), 2);
                i++;
            }
            ReportWindow      rpt            = new ReportWindow();
            SupplyOfferReport supplyOfferRPT = new SupplyOfferReport();

            supplyOfferRPT.SetDataSource(ds.Tables["Sale"]);
            rpt.crv.ViewerCore.ReportSource = supplyOfferRPT;
            Mouse.OverrideCursor            = null;
            _currentWindow.Hide();
            rpt.ShowDialog();
            _currentWindow.Close();
        }
Exemple #16
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var windowManager = new WindowManager();

            var report = new ReportWindow(windowManager);

            report.DataContext = new ReportViewModel(windowManager);
            report.Show();
        }
Exemple #17
0
        private static void Report(Exception e)
        {
            var logger = LogManager.GetLogger("UnHandledException");

            logger.Fatal(ExceptionFormatter.FormatExcpetion(e));
            var reportWindow = new ReportWindow(e);

            reportWindow.Show();
        }
Exemple #18
0
 public CodeService(ReportWindow window)
 {
     this.window       = window;
     this.user_info    = window.user_info;
     this.user_name    = window.user_name;
     this.dic_machine  = window.dic_machine;
     this.process_name = window.process_name;
     this.report       = window.report;
 }
Exemple #19
0
        private static void Report(Exception e, [CallerMemberName] string method = "")
        {
            var logger = LogManager.GetLogger(method);

            logger.Fatal(ExceptionFormatter.ExceptionWithRuntimeInfo(e));
            var reportWindow = new ReportWindow(e);

            reportWindow.Show();
        }
Exemple #20
0
        public void Print(int DisbursementID)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            ReportWindow report = new ReportWindow();

            report.id    = DisbursementID;
            App.ReportID = 1;
            report.Show();
            Mouse.OverrideCursor = null;
        }
Exemple #21
0
        //主动上报
        private void Button_Click_Report(object sender, RoutedEventArgs e)
        {
            Topmost = false
            ;
            ReportWindow window = new ReportWindow();

            window.ShowDialog();

            Topmost = true;
        }
Exemple #22
0
        private void BtnReportSearch_Click(object sender, RoutedEventArgs e)
        {
            ReportWindow window = new ReportWindow()
            {
                ShowInTaskbar = false,
                Owner         = this
            };

            window.ShowDialog();
        }
Exemple #23
0
    private void Awake()
    {
        if (Instance != null)
        {
            Debug.LogError("Double instantiation : " + this);
            Destroy(this);
            return;
        }

        Instance = this;
    }
        public async void OpenReport()
        {
            var reportViewModel = new ReportViewModel(_from, _receivedFiles);
            await reportViewModel.LoadAsync();

            var reportWindow = new ReportWindow {
                DataContext = reportViewModel, Owner = Application.Current.MainWindow
            };

            reportWindow.Show();
        }
        void PrintReport(int id)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            ImusCityHallEntities db = new ImusCityHallEntities();
            string       bankCode   = db.Checks.Find(id).Disbursement.FundBank.Bank.BankCode;
            ReportWindow report     = new ReportWindow();

            report.id       = id;
            report.bankName = bankCode;
            App.ReportID    = 2;
            report.Show();
            Mouse.OverrideCursor = null;
        }
Exemple #26
0
        private void Report_Click(object sender, MouseButtonEventArgs e)
        {
            //建一个新窗口,弹出报告详情
            //需要传递报告的路径
            int t = listReports.SelectedIndex;

            if (t != -1)
            {
                string path = reports[t].FullPath.ToString();
                reportPath = path;
                ReportWindow rw = new ReportWindow();
                rw.Show();
            }
            else
            {
                MessageBox.Show("Please try again.");
            }
        }
Exemple #27
0
        private static void Report(Exception e, bool waitForClose)
        {
            if (e != null)
            {
                var logger = LogManager.GetLogger("UnHandledException");
                logger.Fatal(ExceptionFormatter.FormatException(e));

                var reportWindow = new ReportWindow(e);

                if (waitForClose)
                {
                    reportWindow.ShowDialog();
                }
                else
                {
                    reportWindow.Show();
                }
            }
        }
        static void Main(string[] args)
        {
            // Concrete Components
            var window1 = new LoginWindow("Login to System");
            var window2 = new ReportWindow("Stock Report Screen");
            var window3 = new ReportWindow("Sales Report Screen");

            // Concrete Decorators
            var decorator1 = new ScrollDecorator(window2, "Stock Report Screen");
            var decorator2 = new ThemeDecorator(window1, "Login to System");
            var decorator3 = new ThemeDecorator(window3, "Sales Report Screen");
            var decorator4 = new ThemeDecorator(window2, "Stock Report Screen");

            decorator1.ScrollBy(7);
            decorator2.SetTheme("sky");
            decorator3.SetTheme("autumn");
            decorator4.SetTheme("sea");

            Console.ReadKey();
        }
        public void ShowReport()
        {
            ReportWindow view = GetReportView();

            view.Show();
        }
Exemple #30
0
        //public ICommand ReportCommand { get; set; }

        //xử lí
        public MainViewModel()
        {
            LoadedWindowCommand = new RelayCommand <Window>((p) => { return(true); }, (p) =>
            {
                isLoaded = true;
                p.Hide(); //Ẩn màn hình menu
                //Đăng nhập
                LoginWindow loginWindow = new LoginWindow();
                loginWindow.ShowDialog();

                var loginVM = loginWindow.DataContext as LoginViewModel; //Lấy data context từ static resource LoginVM ngoài LoginWindow.xaml

                //loginWindow là màn hình login, còn loginVM là dữ liệu của màn hình đó
                if (loginVM.isLogin) //Login được mới hiện menu
                {
                    p.Show();
                }
                else
                {
                    p.Close();
                }
            }
                                                            );


            MasterCommand      = new RelayCommand <object>((p) => { return(true); }, (p) => { MasterWindow wd = new MasterWindow(); wd.ShowDialog(); });
            TransactionCommand = new RelayCommand <object>((p) => { return(true); }, (p) => { TransactionWindow wd = new TransactionWindow(); wd.ShowDialog(); });
            ReportCommand      = new RelayCommand <object>((p) => { return(true); }, (p) => { ReportWindow wd = new ReportWindow(); wd.ShowDialog(); });
        }
        public override void DoGUI()
        {
            fsmEditor.OnGUI();

            /* Debug Repaint events
            if (Event.current.type == EventType.repaint)
            {
                Debug.Log("Repaint");
            }*/

            if (Event.current.type == EventType.ValidateCommand)
            {
                switch (Event.current.commandName)
                {
                    case "UndoRedoPerformed":
                    case "Cut":
                    case "Copy":
                    case "Paste":
                    case "SelectAll":
                        Event.current.Use();
                        break;
                }
            }

            if (Event.current.type == EventType.ExecuteCommand)
            {
                switch (Event.current.commandName)
                {
                    /* replaced with Undo.undoRedoPerformed callback added in Unity 4.3
                    case "UndoRedoPerformed":
                        FsmEditor.UndoRedoPerformed();
                        break;
                    */

                    case "Cut":
                        FsmEditor.Cut();
                        break;

                    case "Copy":
                        FsmEditor.Copy();
                        break;

                    case "Paste":
                        FsmEditor.Paste();
                        break;

                    case "SelectAll":
                        FsmEditor.SelectAll();
                        break;

                    case "OpenWelcomeWindow":
                        GetWindow<PlayMakerWelcomeWindow>();
                        break;

                    case "OpenToolWindow":
                        toolWindow = GetWindow<ContextToolWindow>();
                        break;

                    case "OpenFsmSelectorWindow":
                        fsmSelectorWindow = GetWindow<FsmSelectorWindow>();
                        fsmSelectorWindow.ShowUtility();
                        break;

                    case "OpenFsmTemplateWindow":
                        fsmTemplateWindow = GetWindow<FsmTemplateWindow>();
                        break;

                    case "OpenStateSelectorWindow":
                        stateSelectorWindow = GetWindow<FsmStateWindow>();
                        break;

                    case "OpenActionWindow":
                        actionWindow = GetWindow<FsmActionWindow>();
                        break;

                    case "OpenGlobalEventsWindow":
                        globalEventsWindow = GetWindow<FsmEventsWindow>();
                        break;

                    case "OpenGlobalVariablesWindow":
                        globalVariablesWindow = GetWindow<FsmGlobalsWindow>();
                        break;

                    case "OpenErrorWindow":
                        errorWindow = GetWindow<FsmErrorWindow>();
                        break;

                    case "OpenTimelineWindow":
                        timelineWindow = GetWindow<FsmTimelineWindow>();
                        break;

                    case "OpenFsmLogWindow":
                        logWindow = GetWindow<FsmLogWindow>();
                        break;

                    case "OpenAboutWindow":
                        aboutWindow = GetWindow<AboutWindow>();
                        break;

                    case "OpenReportWindow":
                        reportWindow = GetWindow<ReportWindow>();
                        break;

                    case "AddFsmComponent":
                        PlayMakerMainMenu.AddFsmToSelected();
                        break;

                    case "RepaintAll":
                        RepaintAllWindows();
                        break;

                    case "ChangeLanguage":
                        ResetWindowTitles();
                        break;
                }

                GUIUtility.ExitGUI();
            }
        }
Exemple #32
0
    //if it's created
    public static ReportWindow Show(Gtk.Window parent, Report report)
    {
        if (ReportWindowBox == null) {
            ReportWindowBox = new ReportWindow (parent, report);

            //checkboxes
            ReportWindowBox.loadCheckBoxes();

            ReportWindowBox.FillTreeView();

            ReportWindowBox.report_window.Show ();
        }
        else {
            //update all widget only if it's hidden
            if(! ReportWindowBox.report_window.Visible)
                {
                //checkboxes
                ReportWindowBox.loadCheckBoxes();

                ReportWindowBox.FillTreeView();

                ReportWindowBox.report_window.Show ();
            }
        }

        return ReportWindowBox;
    }
Exemple #33
0
    private void on_delete_event(object o, DeleteEventArgs args)
    {
        recordData();

        ReportWindowBox.report_window.Hide();
        ReportWindowBox = null;
    }
    public void OnGUI()
    {
        fsmEditor.OnGUI();

        /*		BeginWindows();

        fsmEditor.DoPopupWindows();

        EndWindows();*/

        if (Event.current.type == EventType.ValidateCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
                case "UndoRedoPerformed":
                    Event.current.Use();
                    break;

                case "Copy":
                    Event.current.Use();
                    break;

                case "Paste":
                    Event.current.Use();
                    break;

                case "SelectAll":
                    Event.current.Use();
                    break;
            }
        }

        if (Event.current.type == EventType.ExecuteCommand)
        {

            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
                case "UndoRedoPerformed":
                    FsmEditor.UndoRedoPerformed();
                    break;

                case "Copy":
                    FsmEditor.Copy();
                    break;

                case "Paste":
                    FsmEditor.Paste();
                    break;

                case "SelectAll":
                    FsmEditor.SelectAll();
                    break;

                case "OpenToolWindow":
                    toolWindow = GetWindow<ContextToolWindow>();
                    break;

                case "OpenFsmSelectorWindow":
                    fsmSelectorWindow = GetWindow<FsmSelectorWindow>();
                    fsmSelectorWindow.ShowUtility();
                    break;

                case "OpenFsmTemplateWindow":
                    fsmTemplateWindow = GetWindow<FsmTemplateWindow>();
                    break;

                case "OpenStateSelectorWindow":
                    stateSelectorWindow = GetWindow<FsmStateWindow>();
                    break;

                case "OpenActionWindow":
                    actionWindow = GetWindow<FsmActionWindow>();
                    break;

                case "OpenGlobalEventsWindow":
                    globalEventsWindow = GetWindow<FsmEventsWindow>();
                    break;

                case "OpenGlobalVariablesWindow":
                    globalVariablesWindow = GetWindow<FsmGlobalsWindow>();
                    break;

                case "OpenErrorWindow":
                    errorWindow = GetWindow<FsmErrorWindow>();
                    break;

                case "OpenFsmLogWindow":
                    logWindow = GetWindow<FsmLogWindow>();
                    break;

                case "OpenAboutWindow":
                    aboutWindow = GetWindow<AboutWindow>();
                    break;

                case "OpenReportWindow":
                    reportWindow = GetWindow<ReportWindow>();
                    break;

                case "AddFsmComponent":
                    PlayMakerMainMenu.AddFsmToSelected();
                    break;

                case "RepaintAll":
                    RepaintAllWindows();
                    break;
            }

            GUIUtility.ExitGUI();
        }
    }