Exemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            searchIntervel++;

            if (searchIntervel == 2)
            {
                if (searchMode == 1)
                {
                    searchIntervel = 0;
                    searchMode     = 0;
                    searchBhikku.setOriginalImage(searchBhikku.bInfo.BhikkuType, searchBhikku.bInfo.ChangeType, false, false);
                    timer1.Enabled = false;
                    searchBhikku   = null;
                }
                else if (searchMode == 2)
                {
                    searchIntervel = 0;
                    searchMode     = 0;
                    timer1.Enabled = false;
                    searchAsapuwa.SetFinalizedsettings();

                    searchAsapuwa = null;
                }
            }
        }
Exemplo n.º 2
0
        private void GenarateReport()
        {
            List <ChangeListReportData> data = new List <ChangeListReportData>();

            foreach (int key in AsapuDict.Keys)
            {
                ChangeListItemAsapuwa a = AsapuDict[key];

                if (a.bhikkuList.Count > 0)
                {
                    data.Add(new ChangeListReportData(a.asapuwaName, "(වැඩසිටිය හැකි ස්වාමින්වහන්සේලා ගණන - " + a.NumberOfKuti + " )", ""));

                    foreach (ChangeListItemBhikku b in a.bhikkuList)
                    {
                        data.Add(new ChangeListReportData(a.asapuwaName, b.bInfo.NameAssumedAtRobing, Utility.GetPostString(b.bInfo.Post)));
                    }
                }
            }

            // foreach(

            ChangeListReport rep = new ChangeListReport();

            rep.MdiParent = this.MdiParent;
            rep.AddData(data, sinhalaDate);
            rep.Show();
        }
Exemplo n.º 3
0
        private void AddAllAsapuwaToPanel(Asapuwa asp, int maxNameLength, Color statusColor, Color captionColor)
        {
            sinhalaDate = string.Concat(Utility.GetSinhalaDate(FromDate), " දින සිට  ", Utility.GetSinhalaDate(ToDate), " දින දක්වා");
            ChangeListItemAsapuwa asapuwaClist = new ChangeListItemAsapuwa(asp.ID, asp.AsapuwaName, asp.AsapuwaNameKey, asapuwaListPanel.Controls, false, maxNameLength, new UpdateChangeItemFinalizeAsapuwa(UpdateChangeItemFinalizeAsapuwa), statusColor, captionColor, asp.NumberOfKuti, sinhalaDate);

            AsapuDict[asp.ID] = asapuwaClist;

            asapuwaClist.minimizedAsapuwa.CanvasColor = Color.Red;
            asapuwaClist.minimizedAsapuwa.Location    = new Point(3, (allAsapuwaPanel.Controls.Count * 45) + 5);
            asapuwaClist.minimizedAsapuwa.Visible     = true;
            allAsapuwaPanel.Controls.Add(asapuwaClist.minimizedAsapuwa);
            asapuwaClist.minimizedAsapuwa.BringToFront();

            MenuItem currentBhikkuDetails = new MenuItem("වර්තමානයේ වැඩසිටින ස්වාමින් වහන්සේලා");

            currentBhikkuDetails.Click += new EventHandler(asapuwaClist.currentBhikkuDetails_Click);

            MenuItem newBhikkuDetails = new MenuItem("අලුතින් තෝරාගත් ස්වාමින් වහන්සේලා");

            newBhikkuDetails.Click += new EventHandler(asapuwaClist.newBhikkuDetails_Click);

            MenuItem finalizeDetails = new MenuItem("ස්වාමින් වහන්සේලා තෝරාගෙන අවසන්");

            finalizeDetails.Click += new EventHandler(asapuwaClist.finalize_Click);


            asapuwaClist.minimizedAsapuwa.nameLabel.MouseEnter    += new EventHandler(allAsapuwaInnerPanel_MouseEnter);
            asapuwaClist.minimizedAsapuwa.captionPanel.MouseEnter += new EventHandler(allAsapuwaInnerPanel_MouseEnter);
            asapuwaClist.minimizedAsapuwa.MouseEnter += new EventHandler(allAsapuwaInnerPanel_MouseEnter);

            asapuwaClist.minimizedAsapuwa.ContextMenu = new System.Windows.Forms.ContextMenu(new MenuItem[] { currentBhikkuDetails, newBhikkuDetails, finalizeDetails });
        }
Exemplo n.º 4
0
 private void HilightAsapuwa(ChangeListItemAsapuwa asp)
 {
     searchMode = 2;
     asp.minimizedAsapuwa.Select();
     timer1.Enabled = true;
     asp.minimizedAsapuwa.nameLabel.ForeColor = Color.Red;
     asp.minimizedAsapuwa.nameLabel.BackColor = Color.WhiteSmoke;
 }
Exemplo n.º 5
0
        private void asapuHistrAsapu_SelectedValueChanged(object sender, EventArgs e)
        {
            if (asapuHistrAsapu.SelectedValue != null && asapuHistrAsapu.SelectedValue is Int32)
            {
                int selectedIndex = (int)asapuHistrAsapu.SelectedValue;

                if (AsapuDict.ContainsKey(selectedIndex))
                {
                    searchAsapuwa = AsapuDict[selectedIndex];

                    HilightAsapuwa(searchAsapuwa);

                    //searchBhikku.setOriginalImage(true, false);
                }
            }
        }
Exemplo n.º 6
0
        private void SaveToHistry()
        {
            using (ChangeList cList = new ChangeList(true))
            {
                cList.ID = ChangeListID;
                cList.DeleteBhikkuHistry();
            }


            using (BikkuInfo bInfo = new BikkuInfo(true))
            {
                foreach (int key in AsapuDict.Keys)
                {
                    ChangeListItemAsapuwa a = AsapuDict[key];

                    foreach (ChangeListItemBhikku b in a.bhikkuList)
                    {
                        bInfo.ID = b.bInfo.ID;
                        bInfo.AddAsapuHistry(a.asapuwaID, FromDate, ToDate, b.bInfo.Post, "", ChangeListID);
                    }
                }
            }
        }