public bool Contains(NeoTabPage tabPage)
 {
     if (this.List.Contains(tabPage))
         return true;
     else
         return false;
 }
 public void Add(NeoTabPage tabPage)
 {
     if (this.List.Contains(tabPage))
         throw new ArgumentException(
             "This tab page control is already within the collection.");
     else
         this.List.Add(tabPage);
 }
예제 #3
0
        // 생성자
        public WeekSpendPage(NeoTabPage Tab, DateTimePicker dtp)
        {
            W_SpendTab = Tab;

            SQLite = new SQLite(); // DB Object
            cmd = SQLite.GetSQLCommand(); // Command Object

            dateTimePicker1 = dtp;
            dateTimePicker1.CloseUp += DateTimePicker1_CloseUp;
        }
예제 #4
0
 public TabPageRemovedEventArgs(NeoTabPage tabPage, int tabPageIndex)
 {
     this.tabPage = tabPage;
     this.tabPageIndex = tabPageIndex;
 }
 public SelectedIndexChangedEventArgs(NeoTabPage tabPage, int tabPageIndex)
 {
     this.tabPage = tabPage;
     this.tabPageIndex = tabPageIndex;
 }
 public void AddNewItem(NeoTabPage tp, bool isChecked)
 {
     if (tp != null)
         tabList.Items.Add(tp, isChecked);
 }
 public void Remove(NeoTabPage tabPage)
 {
     if (this.List.Contains(tabPage))
         this.List.Remove(tabPage);
 }
 public int IndexOf(NeoTabPage tabPage)
 {
     return this.List.IndexOf(tabPage);
 }
 /// <summary>
 /// Removes the specified NeoTabPage control from the control collection.
 /// </summary>
 /// <param name="toBeRemoved">to be removed tab page control</param>
 public void Remove(NeoTabPage toBeRemoved)
 {
     if (toBeRemoved == null)
         return;
     int toBeRemovedIndex = TabPages.IndexOf(toBeRemoved);
     if (toBeRemovedIndex != -1)
         RemoveAt(toBeRemovedIndex);
 }
예제 #10
0
 private void BeginDragDrop(NeoTabPage tabItem,
     Rectangle itemRectangle,
     CommonObjects.ButtonState itemState,
     int itemIndex)
 {
     if (draggingStyle == DragDropStyle.PageEffect)
     {
         Size ps = DisplayRectangle.Size;
         if (ps.Width > 180)
             ps.Width = 180;
         if (ps.Height > 180)
             ps.Height = 180;
         using (Bitmap bm = new Bitmap(ps.Width, ps.Height))
         {
             myDdCursor = new DDPaintCursor();
             using (Graphics gr = Graphics.FromImage(bm))
             {
                 Point pt = PointToScreen(DisplayRectangle.Location);
                 gr.CopyFromScreen(pt.X, pt.Y,
                     0, 0, ps);
             }
             myDdCursor.DrawDDCursor(bm);
         }
     }
     else
     {
         myDdCursor = new DDPaintCursor(renderer);
         myDdCursor.DrawDDCursor(itemRectangle,
             String.IsNullOrEmpty(tabItem.Text) ? tabItem.Name : tabItem.Text,
             itemIndex, itemState);
     }
     DoDragDrop(tabItem, DragDropEffects.Move);
 }
예제 #11
0
 private void ShowTooltip(NeoTabPage tabItem,
     Rectangle itemRectangle)
 {
     try
     {
         if (myTooltipForm == null)
         {
             myTooltipForm = new ToolTips(tabItem.Text, tabItem.ToolTipText, tabItem.ProgressUsedValue, barMaxValue);
             myTooltipForm.TaskCompleted += (sender, e) =>
                 {
                     int tpIndex = -1;
                     Rectangle tpRectangle;
                     CommonObjects.ButtonState tpState;
                     NeoTabPage tp = GetHitTest(queueTooltipPoint,
                         out tpRectangle, out tpState, out tpIndex);
                     if (tp != null && tp.Text != myTooltipForm.TITLE)
                     {
                         myTooltipForm.TITLE = tp.Text;
                         myTooltipForm.DESCRIPTION = tp.ToolTipText;
                         myTooltipForm.VALUE = tp.ProgressUsedValue;
                         myTooltipForm.MAXVALUE = barMaxValue;
                         switch (renderer.NeoTabPageItemsSide)
                         {
                             default:
                                 myTooltipForm.Location = PointToScreen(new Point(tpRectangle.Right + 2,
                                     tpRectangle.Bottom + 2));
                                 break;
                             case TabPageLayout.Bottom:
                                 myTooltipForm.Location = PointToScreen(new Point(tpRectangle.Right + 2,
                                     tpRectangle.Top - 2 - myTooltipForm.Height));
                                 break;
                             case TabPageLayout.Right:
                                 myTooltipForm.Location = PointToScreen(new Point(tpRectangle.Left - 2 - myTooltipForm.Width,
                                     tpRectangle.Bottom + 2));
                                 break;
                         }
                         myTooltipForm.StartAsyncTooltip();
                     }
                     else
                     {
                         myTooltipForm.Close();
                         myTooltipForm = null;
                     }
                 };
         }
         if (myTooltipForm.Status != ToolTips.StatusState.InProgress)
         {
             myTooltipForm.TooltipRenderer = tooltipRenderer;
             switch (renderer.NeoTabPageItemsSide)
             {
                 default:
                     myTooltipForm.Location = PointToScreen(new Point(itemRectangle.Right + 2,
                         itemRectangle.Bottom + 2));
                     break;
                 case TabPageLayout.Bottom:
                     myTooltipForm.Location = PointToScreen(new Point(itemRectangle.Right + 2,
                         itemRectangle.Top - 2 - myTooltipForm.Height));
                     break;
                 case TabPageLayout.Right:
                     myTooltipForm.Location = PointToScreen(new Point(itemRectangle.Left - 2 - myTooltipForm.Width,
                         itemRectangle.Bottom + 2));
                     break;
             }
             myTooltipForm.StartAsyncTooltip();
             myTooltipForm.Show(this);
         }
     }
     catch { ; }
 }
예제 #12
0
        public Form1()
        {
            InitializeComponent();
            
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.StartPosition = FormStartPosition.CenterScreen;

            SQLite = new SQLite(); // DB Object
            cmd = SQLite.GetSQLCommand(); // Command Object
            currentCategory = "Week";
            button1.Visible = true;
            button2.Visible = false;
            
            dateTimePicker1.CloseUp += DateTimePicker1_CloseUp;
            
            neoTabWindow1.Renderer = NeoTabControlLibrary.AddInRendererManager.LoadRenderer("MarginBlueRendererVS2");
            neoTabWindow1.BackColor = Color.White;

            imgBtnContainer1.BackColor = Color.White;
            imgBtnContainer2.BackColor = Color.White;
            button1.Click += Button1_Click;

            panel5.BackColor = Color.LightGray;
            panel2.BackColor = Color.LightGray;

            // Budget
            B_IncomeTab = new NeoTabPage();
            B_SpendTab = new NeoTabPage();
            B_IncomeTab.Text = "수입 예산";
            B_SpendTab.Text = "지출 예산";
            BIp = new Budget(Budget.DMode.income, dateTimePicker1, DateTime.Now);
            BIp.SetLabel();
            BIp.Dock = DockStyle.Fill;
            BIp.SetDate(dateTimePicker1.Value);
            BSp = new Budget(Budget.DMode.spend, dateTimePicker1, DateTime.Now);
            BSp.SetLabel();
            BSp.Dock = DockStyle.Fill;
            BSp.SetDate(dateTimePicker1.Value);
            B_IncomeTab.Controls.Add(BIp);
            B_SpendTab.Controls.Add(BSp);

            // Week
            W_IncomeTab = new NeoTabPage();
            W_SpendingTab = new NeoTabPage();

            // 버튼 선언
            reportBtn = new Button();
            incomeBtn = new Button();
            spendBtn = new Button();
            detailBtn = new Button();

            // 버튼 세팅
            reportBtn.Size = new Size(107, 40);
            reportBtn.Location = new Point(843, 6);
            reportBtn.Text = "인쇄";
            reportBtn.Font = button1.Font;
            incomeBtn.Size = new Size(107, 40);
            incomeBtn.Location = new Point(843, 6);
            incomeBtn.Text = "인쇄";
            incomeBtn.Font = button1.Font;
            spendBtn.Size = new Size(107, 40);
            spendBtn.Location = new Point(843, 6);
            spendBtn.Text = "인쇄";
            spendBtn.Font = button1.Font;
            detailBtn.Size = new Size(107, 40);
            detailBtn.Location = new Point(843, 6);
            detailBtn.Text = "인쇄";
            detailBtn.Font = button1.Font;

            panel1.Controls.Add(reportBtn);
            panel1.Controls.Add(incomeBtn);
            panel1.Controls.Add(spendBtn);
            panel1.Controls.Add(detailBtn);

            reportBtn.Show();
            incomeBtn.Hide();
            spendBtn.Hide();
            detailBtn.Hide();

            // 월별 탭
            M_ReportTab = new NeoTabPage();
            M_ReportTab.Text = "재정 보고";
            sr = new SpendReport(SpendReport.DMode.Month, reportBtn);
            sr.SetDate(dateTimePicker1.Value);
            sr.Validate();
            sr.Dock = DockStyle.Fill;
            M_ReportTab.Controls.Add(sr);

            M_IncomeTab = new NeoTabPage();
            M_IncomeTab.Text = "재정 수입";
            ip = new IncomeProgress(IncomeProgress.DMode.income, incomeBtn);
            ip.Dock = DockStyle.Fill;
            M_IncomeTab.Controls.Add(ip);

            M_SpendingTab = new NeoTabPage();
            M_SpendingTab.Text = "재정 지출";
            sp = new IncomeProgress(IncomeProgress.DMode.spend, spendBtn);
            ip.Dock = DockStyle.Fill;
            M_SpendingTab.Controls.Add(sp);

            M_DetailTab = new NeoTabPage();
            M_DetailTab.Text = "지출 세부 항목";
            sd = new SpendDetail(SpendDetail.DMode.Month, detailBtn);
            sd.Dock = DockStyle.Fill;
            M_DetailTab.Controls.Add(sd);


            // 년도 탭 
            Y_ReportTab = new NeoTabPage();
            Y_ReportTab.Text = "재정 보고";
            yearSR = new SpendReport(SpendReport.DMode.Year, new Button());
            yearSR.Dock = DockStyle.Fill;
            Y_ReportTab.Controls.Add(yearSR);

            Y_IncomeTab = new NeoTabPage();
            Y_IncomeTab.Text = "재정 수입";
            yearIP = new IncomeProgress(IncomeProgress.DMode.Y_income, new Button());
            yearIP.Dock = DockStyle.Fill;
            Y_IncomeTab.Controls.Add(yearIP);

            Y_SpendingTab = new NeoTabPage();
            Y_SpendingTab.Text = "재정 지출";
            yearSP = new IncomeProgress(IncomeProgress.DMode.Y_spend, new Button());
            yearSP.Dock = DockStyle.Fill;
            Y_SpendingTab.Controls.Add(yearSP);

            Y_DetailTab = new NeoTabPage();
            Y_DetailTab.Text = "지출 세부 항목";
            yearSD = new SpendDetail(SpendDetail.DMode.Year, new Button());
            yearSD.Dock = DockStyle.Fill;
            Y_DetailTab.Controls.Add(yearSD);
            
            Y_PersonTab = new NeoTabPage();
            Y_PersonTab.Text = "개인별 정산";
            yearR = new YReport();
            yearR.Dock = DockStyle.Fill;
            Y_PersonTab.Controls.Add(yearR);
            
            neoTabWindow1.SelectedIndexChanged += NeoTabWindow1_SelectedIndexChanged;

            setImgBtn();
            setWeekTabPage();

            // IncomeProgress
            ip.Date = DateTime.Now;
            sp.Date = DateTime.Now;
            ip.setIncomeFromDB();
            sp.setIncomeFromDB();
            ip.setSpendFromDB();
            sp.setSpendFromDB();

            // CheckSum 생성 - 기간별 Sum 저장되는 Table
            createCheckSumTable();
        }