Ejemplo n.º 1
0
 public void UpdateData(int DataIndex, Cook Data)
 {
     // MabiCooker Form 에서 같이 쓰이는 메소드. public
     //this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     this.Selected = Data;
     this.DataIndex = DataIndex;
     if (this.ForTrace.Count == 0) bBack.Enabled = false;
     this.Text = Data.getName();
     lStuffOne.Text = (Data.getStuff())[0];
     lStuffTwo.Text = (Data.getStuff())[1];
     tiCheckAlert.Enabled = false;
     if ((Data.getRatio())[0] == 230)
     {
         this.Text += Properties.Resources.StrCannotCook;
     }
     if (Data.getStuff().Length == 3)
     {
         lStuffThree.Text = (Data.getStuff())[2];
         lStuffThree.Visible = true;
     }
     else
     {
         lStuffThree.Text = "";
         lStuffThree.Visible = false;
     }
     lEffects.Text = Data.getEffect();
     lRank.Text = Data.getRank().ToString();
     this.message = Data.getRankName();
     lMessage.Text = this.message;
 }
Ejemplo n.º 2
0
 private bool FindCookName(Cook o)
 {
     if (o.getName() == ChkKeyword)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 3
0
        override public bool Equals(Object o)
        {
            Cook buffer = (Cook)o;

            if (this.cName.Equals(buffer.getName()))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 4
0
        public CookDetailView(MabiCooker Main, int DataIndex, Cook Data, ListBox FavView, List<Stuff> StuffData)
        {
            InitializeComponent();

            if (Properties.Settings.Default.LastInfoPoint.X != 0 && Properties.Settings.Default.LastInfoPoint.Y != 0)
            {
                this.StartPosition = FormStartPosition.Manual;
                this.Location = new Point(Properties.Settings.Default.LastInfoPoint.X, Properties.Settings.Default.LastInfoPoint.Y);
            }

            this.Selected = Data;
            this.FavListView = FavView;
            this.MainWindow = Main;
            this.DataIndex = DataIndex;
            this.StuffData = StuffData;
            UpdateData(DataIndex, Data);
        }
Ejemplo n.º 5
0
        private bool InitBase()
        {
            /* Text Data Mode */
            String lineBuffer; StreamReader CookReader;
            if (File.Exists(Properties.Resources.FileCookData) && File.Exists(Properties.Resources.FileFavoriteData) && File.Exists(Properties.Resources.FileStuffData))
            {
                #region old code : ~v2.0
                /* ~20100103 // Version 2.0 * //
                CookData = new StreamReader("cook.dat");
                for (int i = 0; i < RankSize; i++) RankTable[i] = new Queue();
                while ((lineBuffer = CookData.ReadLine()) != null)
                {
                    dataBuffer = new Cook(lineBuffer);
                    RankTable[Cook.checkRank(dataBuffer.getRank())].waitNodeAdd(dataBuffer);
                }
                for (int i = 0; i < RankSize; i++)
                {
                    PreparedDatas[i] = new Cook[RankTable[i].getQueueLength()]; int j = 0;
                    while ((dataBuffer = RankTable[i].serviceNode()) != null) PreparedDatas[i][j++] = dataBuffer;
                }
                cbRankSelector.SelectedIndex = 0;
                CookData.Close();

                CookData = new StreamReader("favcook.dat");
                for (int i = 0; (lineBuffer = CookData.ReadLine()) != null; i++)
                {
                    dataBuffer = new Cook(lineBuffer);
                    FavList[i] = dataBuffer;
                    FavListLength++;
                }
                CookData.Close();
                // ~20100103 // Version 2.0 // END */
                #endregion
                #region old code : ~v2.3
                //* 20100103~ // Version 2.1 */
                // SIMPLE IS BEST!!! //
                CookReader = new StreamReader("cook.dat");
                while ((lineBuffer = CookReader.ReadLine()) != null) CookData.Add(new Cook(lineBuffer));
                CookReader.Close();
                CookReader = new StreamReader("favcook.dat");
                while ((lineBuffer = CookReader.ReadLine()) != null)
                {
                    Cook DataBuffer = new Cook(lineBuffer); int i = 0;
                    if ((i = CookData.IndexOf(DataBuffer)) != -1) FavList.Add(i);
                }
                CookReader.Close();
                CookReader = new StreamReader("stuff.dat");
                while ((lineBuffer = CookReader.ReadLine()) != null) StuffData.Add(new Stuff(lineBuffer));
                CookReader.Close();
                // 20100103~ // Version 2.1 // END */
                #endregion
                return true;
            }
            /* XML Data Mode */
            else if (File.Exists(Properties.Resources.FileCookDataXml))
            {
                DataPool.ReadXml(Properties.Resources.FileCookDataXml);
                return false;
            }
            else
            {
                MessageBox.Show(Properties.Resources.MsgNoDataFile, Properties.Resources.StrNotice, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return false;
            }
        }
Ejemplo n.º 6
0
 private bool CheckCookStuff(Cook c)
 {
     foreach (string stuffs in c.Stuff) if (stuffs.Contains(tbSearchTerm.Text)) return true;
     return false;
 }
Ejemplo n.º 7
0
 private bool CheckCookRank(Cook c)
 {
     if (c.Rank.ToString() == Cook.checkRank(cbRankSelector.SelectedIndex).ToString())
         return true;
     else
         return false;
 }
Ejemplo n.º 8
0
 private bool CheckCookName(Cook c)
 {
     if (c.Name.Contains(tbSearchTerm.Text)) return true;
     else return false;
 }
Ejemplo n.º 9
0
 private bool CheckCookEffect(Cook c)
 {
     if (c.getEffect().Contains(tbSearchTerm.Text)) return true;
     else return false;
 }
Ejemplo n.º 10
0
 private bool FindCookName(Cook o)
 {
     if (o.getName() == ChkKeyword) return true;
     else return false;
 }
Ejemplo n.º 11
0
 public CookData(List<Cook> CList, List<Stuff> SList, Cook cook)
 {
     this.CookList = CList;
     this.StuffList = SList;
     this.ChkKeyword = cook.getName();
     this.CookIndex = this.CookList.FindIndex(FindCookName);
     this.SelectedCook = this.CookList[CookIndex];
     CheckStuff();
 }
Ejemplo n.º 12
0
 public CookData(List<Cook> CList, List<Stuff> SList, String name)
 {
     this.CookList = CList;
     this.StuffList = SList;
     this.ChkKeyword = name;
     this.CookIndex = this.CookList.FindIndex(FindCookName);
     this.SelectedCook = this.CookList[CookIndex];
     CheckStuff();
 }
Ejemplo n.º 13
0
 public CookData(List<Cook> CList, List<Stuff> SList, int index)
 {
     this.CookList = CList;
     this.StuffList = SList;
     this.CookIndex = index;
     this.SelectedCook = this.CookList[this.CookIndex];
     CheckStuff();
 }