// Methods
    public SchoolYearScoreReportNew()
    {
        string reportName = "學年成績單(新制)";
        string reportPath = "成績相關報表";

        this.buttonStudent          = new ButtonAdapter();
        this.buttonStudent.Text     = reportName;
        this.buttonStudent.Path     = reportPath;
        this.buttonStudent.OnClick += new EventHandler(this.buttonStudent_OnClick);
        this.buttonClass            = new ButtonAdapter();
        this.buttonClass.Text       = reportName;
        this.buttonClass.Path       = reportPath;
        this.buttonClass.OnClick   += new EventHandler(this.buttonClass_OnClick);
        StudentReport.AddReport(this.buttonStudent);
        ClassReport.AddReport(this.buttonClass);

        string        Student = "SHEvaluation.SchoolYearScoreReportNew.Student";
        string        Class   = "SHEvaluation.SchoolYearScoreReportNew.Class";
        RibbonBarItem item1   = FISCA.Presentation.MotherForm.RibbonBarItems["學生", "資料統計"];

        item1["報表"][reportPath][reportName].Enable = FISCA.Permission.UserAcl.Current[Student].Executable;
        RibbonBarItem item2 = FISCA.Presentation.MotherForm.RibbonBarItems["班級", "資料統計"];

        item2["報表"][reportPath][reportName].Enable = FISCA.Permission.UserAcl.Current[Class].Executable;

        //權限設定
        Catalog permission1 = RoleAclSource.Instance["學生"]["報表"];

        permission1.Add(new RibbonFeature(Student, reportName));
        Catalog permission2 = RoleAclSource.Instance["班級"]["報表"];

        permission2.Add(new RibbonFeature(Class, reportName));
    }
Exemple #2
0
 public static void Main()
 {
     ButtonAdapter newReportButton = new ButtonAdapter();
     newReportButton.Text = "第一、二次與期末考加權成績排名";
     newReportButton.Path = "明德女中/成績相關報表";
     newReportButton.OnClick += new EventHandler(newReportButton_OnClick);
     SmartSchool.Customization.PlugIn.Report.ClassReport.AddReport(newReportButton);
 }
 public SemesterMoralScoreCalc()
 {
     button          = new SecureButtonAdapter("Report0270");
     button.Text     = "德行成績試算表(舊制)";
     button.Path     = "學務相關報表";
     button.OnClick += new EventHandler(button_OnClick);
     ClassReport.AddReport(button);
 }
 public ClassSemesterScore()
 {
     classButton          = new SecureButtonAdapter("Report0160");
     classButton.Text     = "班級學生學期成績一覽表";
     classButton.Path     = "成績相關報表";
     classButton.OnClick += new EventHandler(classButton_OnClick);
     ClassReport.AddReport(classButton);
 }
Exemple #5
0
 /// <summary>
 /// 新增學生相關報表按鈕
 /// </summary>
 /// <param name="report"></param>
 public static void AddReport(ButtonAdapter report)
 {
     if (_Manager == null)
     {
         catchItems.Add(report);
     }
     _Manager.AddButton(report);
 }
 internal override void PaintOver(PaintEventArgs e, CheckState state)
 {
     if (Control.Appearance == Appearance.Button)
     {
         ButtonAdapter.PaintOver(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked);
     }
     else
     {
         PaintUp(e, state);
     }
 }
 internal override void PaintDown(PaintEventArgs e, CheckState state)
 {
     if (Control.Appearance == Appearance.Button)
     {
         ButtonAdapter.PaintDown(e, Control.CheckState);
     }
     else
     {
         PaintUp(e, state);
     }
 }
Exemple #8
0
 /// <summary>
 /// 移除學生相關報表按鈕
 /// </summary>
 /// <param name="report"></param>
 public static void RemoveReport(ButtonAdapter report)
 {
     if (_Manager == null)
     {
         if (catchItems.Contains(report))
         {
             catchItems.Remove(report);
         }
     }
     else
     {
         _Manager.RemoveButton(report);
     }
 }
Exemple #9
0
 /// <summary>
 /// 新增學生相關右鍵選單按鈕
 /// </summary>
 public static void AddItem(ButtonAdapter item)
 {
     if (_Manager == null)
     {
         if (catchItems == null)
         {
             catchItems = new List <ButtonAdapter>();
         }
         catchItems.Add(item);
     }
     else
     {
         _Manager.Add(item);
     }
 }
        internal override void PaintUp(PaintEventArgs e, CheckState state)
        {
            if (Control.Appearance == Appearance.Button)
            {
                ButtonAdapter.PaintUp(e, Control.CheckState);
            }
            else
            {
                ColorData  colors = PaintRender(e).Calculate();
                LayoutData layout = Layout(e).Layout();
                PaintButtonBackground(e, Control.ClientRectangle, null);

                if (!layout.Options.DotNetOneButtonCompat)
                {
                    layout.TextBounds.Offset(-1, -1);
                }

                layout.ImageBounds.Offset(-1, -1);

                AdjustFocusRectangle(layout);

                if (!string.IsNullOrEmpty(Control.Text))
                {
                    //minor adjustment to make sure the appearance is exactly the same as Win32 app.
                    int focusRectFixup = layout.Focus.X & 0x1; // if it's odd, subtract one pixel for fixup.
                    if (!Application.RenderWithVisualStyles)
                    {
                        focusRectFixup = 1 - focusRectFixup;
                    }

                    layout.Focus.Offset(-(focusRectFixup + 1), -2);
                    layout.Focus.Width = layout.TextBounds.Width + layout.ImageBounds.Width - 1;
                    layout.Focus.Intersect(layout.TextBounds);

                    if (layout.Options.TextAlign != LayoutUtils.AnyLeft && layout.Options.UseCompatibleTextRendering && layout.Options.Font.Italic)
                    {
                        // fixup for GDI+ text rendering.
                        layout.Focus.Width += 2;
                    }
                }

                PaintImage(e, layout);
                DrawCheckBox(e, layout);
                PaintField(e, layout, colors, colors.WindowText, true);
            }
        }
        internal override void PaintUp(PaintEventArgs e, CheckState state)
        {
            if (Control.Appearance == Appearance.Button)
            {
                ButtonAdapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked);
            }
            else
            {
                ColorData  colors = PaintRender(e.Graphics).Calculate();
                LayoutData layout = Layout(e).Layout();
                PaintButtonBackground(e, Control.ClientRectangle, null);

                PaintImage(e, layout);
                DrawCheckBox(e, layout);
                PaintField(e, layout, colors, colors.windowText, true);
            }
        }
Exemple #12
0
        internal override void PaintUp(PaintEventArgs e, CheckState state)
        {
            if (Control.Appearance == Appearance.Button)
            {
                ButtonAdapter.PaintUp(e, Control.CheckState);
                return;
            }

            ColorData colors = PaintFlatRender(e).Calculate();

            if (Control.Enabled)
            {
                PaintFlatWorker(e, colors.windowText, colors.highlight, colors.windowFrame, colors);
            }
            else
            {
                PaintFlatWorker(e, colors.buttonShadow, colors.buttonFace, colors.buttonShadow, colors);
            }
        }
        public SemesterScoreReport()
        {
            string reportName = "學期成績單";
            string path       = "成績相關報表";

            _ErrorMessage = new StringBuilder();

            button          = new SecureButtonAdapter("Report0050");
            button.Text     = reportName;
            button.Path     = path;
            button.OnClick += new EventHandler(button_OnClick);
            StudentReport.AddReport(button);

            button2          = new SecureButtonAdapter("Report0150");
            button2.Text     = reportName;
            button2.Path     = path;
            button2.OnClick += new EventHandler(button2_OnClick);
            ClassReport.AddReport(button2);
        }
        public MultiSemesterScore()
        {
            string report_name = "多學期成績單";
            string report_path = "成績相關報表";

            //_student_button = new ButtonAdapter();
            //_student_button.Text = report_name;
            //_student_button.Path = report_path;
            //_student_button.OnClick += new EventHandler(studentButton_OnClick);
            //StudentReport.AddReport(_student_button);

            _class_button          = new SecureButtonAdapter("Report0170");
            _class_button.Text     = report_name;
            _class_button.Path     = report_path;
            _class_button.OnClick += new EventHandler(classButton_OnClick);
            ClassReport.AddReport(_class_button);

            ButtonAdapter _student_button = new SecureButtonAdapter("Report0060");

            _student_button.Text     = report_name;
            _student_button.Path     = report_path;
            _student_button.OnClick += new EventHandler(_student_button_OnClick);
            StudentReport.AddReport(_student_button);
        }
Exemple #15
0
 /// <summary>
 /// Событие - нажатие на кнопку.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Click(object sender, RoutedEventArgs e)
 {
     btn = new ButtonAdapter((sender as Button).Name, listClients);
     SetListValues();
 }
Exemple #16
0
        /// <inheritdoc />
        public void AddOnClickListenerAsync(Func <Task> action)
        {
            EnsureInitialized();

            ButtonAdapter.AddOnClickListenerAsync(action);
        }
Exemple #17
0
        /// <inheritdoc />
        public void AddOnClickListener(Action action)
        {
            EnsureInitialized();

            ButtonAdapter.AddOnClickListener(action);
        }