Example #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.processing_charts_page = ((VTManager.Processing_Charts)(target));

            #line 10 "..\..\..\ProcessingPages\Processing_Charts.xaml"
                this.processing_charts_page.Loaded += new System.Windows.RoutedEventHandler(this.processing_charts_page_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.page_header = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.main_costs = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.block1 = ((VTManager.Interactive.VTManagerStat)(target));
                return;

            case 5:
                this.block2 = ((VTManager.Interactive.VTManagerStat)(target));
                return;

            case 6:
                this.chart_items = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.vt_type1 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 8:
                this.vt_type2 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 9:
                this.vt_type3 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 10:
                this.vt_type4 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 11:
                this.vt_type5 = ((VTManager.Interactive.VTManagerChart)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 11 "..\..\..\ProductionPages\Production_Charts.xaml"
                ((VTManager.ProductionPages.Production_Charts)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Page_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.page_header = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.vt_mark2 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 4:
                this.vt_mark3 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 5:
                this.vt_mark4 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 6:
                this.vt_mark5 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 7:
                this.vt_mark6 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 8:
                this.vt_mark7 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 9:
                this.vt_mark8 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 10:
                this.vt_mark9 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 11:
                this.vt_mark10 = ((VTManager.Interactive.VTManagerChart)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\..\ProcessingPages\Processing_Resources.xaml"
                ((VTManager.ProcssingPages.Processing_Resources)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Page_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.page_header = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.chart_items = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.res1 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 5:
                this.res2 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 6:
                this.chart_items2 = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.res3 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 8:
                this.res4 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 9:
                this.res5 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 10:
                this.res6 = ((VTManager.Interactive.VTManagerChart)(target));
                return;

            case 11:
                this.res7 = ((VTManager.Interactive.VTManagerChart)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #4
0
        public static void runQuery(string query, string target_column, VTManager.Interactive.VTManagerChart source)
        {
            /*Третья перегрузка метода. Тоже самое, что и вторая, но записывает ЧИСЛОВЫЕ данные в контрол рейтинга
             * Используется для красивого вывода статистики, например.*/
            MySqlConnection cn = new MySqlConnection(VTManagerConfig.data);

            cn.Open();
            MySqlCommand    cmd = new MySqlCommand();
            MySqlDataReader reader;

            cmd.Connection  = cn;
            cmd.CommandText = query;
            reader          = cmd.ExecuteReader();
            if (reader.Read())
            {
                bool b = double.TryParse(reader[target_column].ToString(), out _);
                if (b)
                {
                    source.Value = double.Parse(reader[target_column].ToString());
                }
            }
            cn.Close();
        }