private static void AdResults(ShowResult result)
 {
     if (result != ShowResult.Finished)
     {
         SceneManager.LoadScene("TitleScreen");
     }
 }
Exemple #2
0
 private void HandleShowResult(ShowResult result)
 {
     switch (result)
     {
         case ShowResult.Finished:
             Debug.Log("The ad was successfully shown.");
             MoneySystem.money += 1000;
             RewardPanel.SetActive(true);
             FailedPanel.SetActive(false);
             PlayerPrefs.SetString("Ads","Off");
             PlayerPrefs.SetInt("AdsTimer", 0);
             // YOUR CODE TO REWARD THE GAMER
             // Give coins etc.
             break;
         case ShowResult.Skipped:
             Debug.Log("The ad was skipped before reaching the end.");
             FailedPanel.SetActive(true);
             RewardPanel.SetActive(false);
             break;
         case ShowResult.Failed:
             Debug.LogError("The ad failed to be shown.");
             FailedPanel.SetActive(true);
             RewardPanel.SetActive(false);
             break;
     }
 }
 static void HandleShowResult(ShowResult result)
 {
     if (result == ShowResult.Finished)
     {
         AdManager.Instance.OnVideoAdWatched();
     }
 }
Exemple #4
0
 public void ViewEnd(ShowResult result)
 {
     if (result == ShowResult.Finished)
     {
         Debug.Log("view end die");
         PolySoundManager.UnPauseAudio();
         Time.timeScale = 1f;
         transform.parent.GetComponent<ActivateUI>().DisabledAll();
         
     }
 }
 void RewardViewing(ShowResult showResult)
 {
     switch(showResult)
     {
         case ShowResult.Finished:
             lastAdvertisementTime = Time.time;
             menuManager.SpawnGiftFlys(false);
             break;
         default:
             break;
     }
 }
 private void HandleShowResult(ShowResult result)
 {
     switch (result) {
     case ShowResult.Finished:
         PlayerPrefs.SetInt ("retries", 3);
         break;
     case ShowResult.Skipped:
         break;
     case ShowResult.Failed:
         break;
     }
 }
 void AdCallbackHandler(ShowResult result)
 {
     switch (result) {
     case ShowResult.Finished:
         Debug.Log ("Ad Finished. Rewarding player...");
         break;
     case ShowResult.Skipped:
         Debug.Log ("Ad skipped.");
         break;
     case ShowResult.Failed:
         Debug.Log("Failed");
         break;
     }
 }
 void AdCallbackhandler(ShowResult result)
 {
     switch(result)
     {
     case ShowResult.Finished:
         Debug.Log ("Ad Finished. Rewarding player...");
         break;
     case ShowResult.Skipped:
         Debug.Log ("Ad skipped. Son, I am dissapointed in you");
         break;
     case ShowResult.Failed:
         Debug.Log("I swear this has never happened to me before");
         break;
     }
 }
Exemple #9
0
 private void HandleShowResult(ShowResult result)
 {
     switch (result)
     {
         case ShowResult.Finished:
             Debug.Log("Video completed. Offer a reward to the player.");
             break;
         case ShowResult.Skipped:
             Debug.LogWarning("Video was skipped.");
             break;
         case ShowResult.Failed:
             Debug.LogError("Video failed to show.");
             break;
     }
 }
Exemple #10
0
 private void HandleShowResult(ShowResult result)
 {
     switch (result) {
     case ShowResult.Finished:
         Debug.Log("Ad Finished");
         break;
     case ShowResult.Skipped:
         Debug.Log("Ad Skipped");
         break;
     case ShowResult.Failed:
         Debug.Log("Ad Failed");
         break;
     }
     adsFinished = true;
 }
Exemple #11
0
    IEnumerator CallShow()
    {
        //광고 준비 여부
        while(Advertisement.IsReady() == false)
        {
            yield return null;
        }

        m_AdResult = ShowResult.Failed;
        // 광고 출력 옵션 설정
        ShowOptions Options = new ShowOptions();
        Options.resultCallback = CallbackAD;

        Advertisement.Show("", Options);
    }
 private void HandleShowResult(ShowResult result)
 {
     switch (result)
     {
     case ShowResult.Finished:
         Debug.Log("The ad was successfully shown.");
         GameManager.instance.playerFoodPoints = GameManager.instance.playerFoodPoints + 50;
         break;
     case ShowResult.Skipped:
         Debug.Log("The ad was skipped before reaching the end.");
         break;
     case ShowResult.Failed:
         Debug.LogError("The ad failed to be shown.");
         break;
     }
 }
Exemple #13
0
 private static void HandleShowResult_0(ShowResult result)
 {
     switch (result)
     {
       case ShowResult.Finished:
     Debug.Log("The ad was successfully shown.");
     GameObject.FindObjectOfType<Clipboard>().StartShowMe();
     break;
       case ShowResult.Skipped:
     Debug.Log("The ad was skipped before reaching the end.");
     break;
       case ShowResult.Failed:
     Debug.LogError("The ad failed to be shown.");
     break;
     }
 }
    public void HandleShowResult(ShowResult result)
    {
        switch(result){

            case ShowResult.Finished:
                Debug.Log ("The ad was successfully shown.");
                status = State.Ready;
                break;
            case ShowResult.Skipped:
                Debug.Log ("The ad was skipped before reaching the end.");
                break;
            case ShowResult.Failed:
                Debug.Log ("The ad failed to be shown.");
                break;
        }
    }
 private void HandleShowResult(ShowResult result)
 {
     switch (result) {
         case ShowResult.Finished:
             Debug.Log("Ad was shown");
             PrefsController.AddTotalCoins(100);
             GameObject.FindObjectOfType<ShaderMenuController>().PopulateBallShaders();
             break;
         case ShowResult.Skipped:
             Debug.Log("Ad was skipped");
             break;
         case ShowResult.Failed:
             Debug.Log("Ad has failed");
             break;
     }
 }
	void HandleShowResult (ShowResult result) {
		switch (result)
		{
		case ShowResult.Finished:
			SetGodButtonText("Congrats!");
			GeneralManager.godMode = true;
			break;
		case ShowResult.Skipped:
			SetGodButtonText("Active god mode by watching a video!!");
			Debug.LogWarning ("Video was skipped.");
			break;
		case ShowResult.Failed:
			SetGodButtonText("Active god mode failed ...");
			Debug.LogWarning ("Video failed to show.");
			break;
		}
	}
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    void ResultCallback(ShowResult result)
    {
        //Debug.Log("-_-_ ResultCallback: " + result.ToString());

        if(result == ShowResult.Finished){
            int coins = PlayerPrefs.GetInt("Coins") + 20;
            CoinsManager.instance.SetCoins(coins);
            int numVideosPlayed = PlayerPrefs.GetInt("NumVideosPlayed");
            PlayerPrefs.SetInt("NumVideosPlayed", numVideosPlayed+1);
            //ParseManager.instance.SaveCurrentData();
            bShow = false;
            button.enabled = false;
            image.enabled = false;
            PlayerPrefs.SetString("savedTimeAds", DateTime.Now.ToString());
            textCoinsAnimator.SetTrigger("StartAnim");
            GetComponent<AudioSource>().Play();
        }
    }
Exemple #18
0
	private void HandleShowResult(ShowResult result)
	{
		switch (result)
		{
		case ShowResult.Finished:
			Debug.Log("The ad was successfully shown.");
			//
			// YOUR CODE TO REWARD THE GAMER
			// Give coins etc.
			break;
		case ShowResult.Skipped:
			Debug.Log("The ad was skipped before reaching the end.");
			break;
		case ShowResult.Failed:
			Debug.LogError("The ad failed to be shown.");
			break;
		}
	}
Exemple #19
0
    private void HandleShowResult(ShowResult result)
    {
        beijingMusic.Play ();

        switch (result) {
        case ShowResult.Finished:
            Debug.Log ("The ad was successfully shown.");
            Debug.Log ("Granting the user a reward...");
            Globe.OnReward ();
            break;
        case ShowResult.Skipped:
            Debug.Log ("The ad was skipped before reaching the end.");
            break;
        case ShowResult.Failed:
            Debug.LogError ("The ad failed to be shown.");
            break;
        }
    }
    private void HandleShowResult(ShowResult result)
    {
        switch (result) {
            case ShowResult.Finished:
                Debug.Log("The ad was successfully shown.");

                PlayerPrefs.SetInt("energy", PlayerPrefs.GetInt("energy", 0) + 3);

                ClosePopup();

                break;
            case ShowResult.Skipped:
                Debug.Log("The ad was skipped before reaching the end.");
                break;
            case ShowResult.Failed:
                Debug.LogError("The ad failed to be shown.");
                break;
        }
    }
	void HandleShowResult (ShowResult result)
	{
		switch (result) {
		case ShowResult.Finished:
			Debug.Log ("The ad was successfully shown.");
                // 광고 본 보상 처리.
			StartCoroutine (DelaySend (DELAY_TIME));

			break;
		case ShowResult.Skipped:
			Debug.Log ("The ad was skipped before reaching the end.");
			StartCoroutine (DelaySend (DELAY_TIME));
			break;
		case ShowResult.Failed:
			Debug.LogError ("The ad failed to be shown.");
			StartCoroutine (DelaySend (DELAY_TIME));
			break;
		}
	}
Exemple #22
0
    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
            case ShowResult.Finished:
                UserManager.Instance().AdsSkip();
                Debug.Log("광고끝");
                break;

            case ShowResult.Skipped:
                UserManager.Instance().AdsSkip();
                Debug.Log("광고스킵");
                break;

            case ShowResult.Failed:

                break;
        }
    }
Exemple #23
0
 private void HandleShowResult(ShowResult result)
 {
     switch (result)
     {
     case ShowResult.Finished:
         Debug.Log("The ad was successfully shown.");
         //
         // YOUR CODE TO REWARD THE GAMER
         // Give coins etc.
         GameGlobalVariablesManager.EnergyAvailable+=1;
         SavedData.Inst.SaveAllData ();
         break;
     case ShowResult.Skipped:
         Debug.Log("The ad was skipped before reaching the end.");
         break;
     case ShowResult.Failed:
         Debug.LogError("The ad failed to be shown.");
         break;
     }
 }
 void AdCallbackhandler(ShowResult result)
 {
     Debug.Log("class called");
     switch(result)
     {
     case ShowResult.Finished:
         Debug.Log ("Ad Finished. Rewarding player...");
         AdsManager.getInstance().myCallback(true);
         GoogleGamesManager.continue10Times();
         break;
     case ShowResult.Skipped:
         Debug.Log ("Ad skipped. Son, I am dissapointed in you");
         AdsManager.getInstance().myCallback(false);
         break;
     case ShowResult.Failed:
         Debug.Log("I swear this has never happened to me before");
         AdsManager.getInstance().myCallback(false);
         break;
     }
 }
    private static void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:
            Debug.Log("The ad was successfully shown.");
            if (!object.ReferenceEquals(_handleFinished,null)) _handleFinished();
            break;
        case ShowResult.Skipped:
            Debug.LogWarning("The ad was skipped before reaching the end.");
            if (!object.ReferenceEquals(_handleSkipped,null)) _handleSkipped();
            break;
        case ShowResult.Failed:
            Debug.LogError("The ad failed to be shown.");
            if (!object.ReferenceEquals(_handleFailed,null)) _handleFailed();
            break;
        }

        if (!object.ReferenceEquals(_onContinue,null)) _onContinue();
    }
Exemple #26
0
    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
            case ShowResult.Finished:
                Debug.Log("The ad was successfully shown.");

                MainSingleTon.Instance.cPE += 20;
                string Query1 = "UPDATE userTable SET cPE = " + MainSingleTon.Instance.cPE;

                GameObject.Find("GameManager/SqlManager").GetComponent<MainSceneSQL>().UpdateQuery(Query1);

                break;
            case ShowResult.Skipped:
                Debug.Log("The ad was skipped before reaching the end.");
                break;
            case ShowResult.Failed:
                Debug.LogError("The ad failed to be shown.");
                break;
        }
    }
    void CallbackAD(ShowResult _result)
    {
        switch(_result)
        {
            case ShowResult.Failed:

                break;

            case ShowResult.Skipped:

                break;

            case ShowResult.Finished:

                break;
            default:
                break;
        }

        SceneManager.LoadScene(SceneManager.GetActiveScene().name);
    }
Exemple #28
0
    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:
            Debug.Log("The ad was successfully shown.");
            //
            // YOUR CODE TO REWARD THE GAMER
            // Give coins etc.
            //MAudioManager.current.PlayFx(AudioName.PurchaseClick);
            StoreInventory.GiveItem(AnimineStoreAssets.GOLD_COIN_VC_ITEM_ID,goldCoinCount);

            break;
        case ShowResult.Skipped:
            Debug.Log("The ad was skipped before reaching the end.");
            break;
        case ShowResult.Failed:
            Debug.LogError("The ad failed to be shown.");
            break;
        }
    }
Exemple #29
0
 private void HandleShowResult(ShowResult result)
 {
     switch (result) {
     case ShowResult.Finished:
         Debug.Log ("The ad was successfully shown.");
         levelManger.addLive ();
         break;
     case ShowResult.Skipped:
         Debug.Log ("The ad was skipped before reaching the end.");
         levelManger.checkEndGame ();
         break;
     case ShowResult.Failed:
         Debug.LogError ("The ad failed to be shown.");
         levelManger.checkEndGame ();
         break;
     default:
         levelManger.checkEndGame();
     break;
     }
     levelManger.pauseGameWithoutPauseMenu (LevelManager.PAUSE_GAME.UNPAUSE);
 }
Exemple #30
0
    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:
            Debug.Log("The ad was successfully shown.");
            //
            // YOUR CODE TO REWARD THE GAMER
            // Give coins etc.
            PaulyBallLives.lives += 1;
            Application.LoadLevel(Application.loadedLevel +1);
            break;

        case ShowResult.Skipped:
            Debug.Log("The ad was skipped before reaching the end.");
            Application.LoadLevel(Application.loadedLevel +1);
            break;
        case ShowResult.Failed:
            Debug.LogError("The ad failed to be shown.");
            Application.LoadLevel(Application.loadedLevel +1);
            break;
        }
    }
Exemple #31
0
 void OnWatchNonRewardedADComplete(ShowResult result)
 {
     EndADSequence();
     ResetInterstitialADManager();
 }
        /// <summary>
        /// 导入
        /// </summary>
        public void import_P_C_Record_Template_previous()
        {
            string xlsFilePath = FileNameDialog.getSelectedFilePathWithDefaultDir("请选择成衣成本记录:", "*.xls,*.xlsx|*.xls;*.xlsx", defaultDir);

            if (string.IsNullOrEmpty(xlsFilePath))
            {
                return;
            }
            if (!File.Exists(xlsFilePath))
            {
                return;
            }
            tbPath.Text = xlsFilePath;
            MyExcel myExcel = new MyExcel(xlsFilePath);

            myExcel.open();
            Tools.AppManagement.add(myExcel.HwndOfApp);
            List <Worksheet> wSList       = myExcel.getVisualWS();
            int notProductsCostFile_Count = 0;

            for (int i = 0; i <= wSList.Count - 1; i++)
            {
                Worksheet wS  = wSList[i];
                MSG       msg = null;
                //非成本文件,则忽略。
                if (!(msg = isProductsCostRecord(wS)).Flag)
                {
                    notProductsCostFile_Count++;
                    continue;
                }
                Usual_Excel_Helper uEHelper = new Usual_Excel_Helper(wS);
                string             PN       = uEHelper.getSpecificCellValue("A1");
                if ("请在此填写成品名称".Equals(PN))
                {
                    MessageBox.Show(wS.Index + "." + wS.Name + ":  请填写成品名称!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    continue;
                }
                if (string.IsNullOrEmpty(PN))
                {
                    MessageBox.Show(wS.Index + "." + wS.Name + ": 产品名称不能为空!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    continue;
                }
                //判断是否存在该成品的记录
                string sqlStr            = string.Format(@"SELECT 1 FROM Products_Cost WHERE Product_Name = '{0}'", PN);
                System.Data.DataTable dt = OracleDaoHelper.getDTBySql(sqlStr);
                if (dt.Rows.Count > 0)
                {
                    //删除文档
                    sqlStr = string.Format(@"DELETE FROM Products_Cost where Product_Name = '{0}'", PN);
                    OracleDaoHelper.executeSQL(sqlStr);
                }
                //先导入概要工序。
                int rowMaxIndex = uEHelper.getTheMaxRowIndexUntilBlankRow();
                //int rowMaxIndex = wS.UsedRange.Rows.Count;
                string seq_p_c_record   = string.Empty;
                string summary_process  = string.Empty;
                string specific_process = string.Empty;
                string man_hours        = string.Empty;
                string labour_cost      = string.Empty;
                pb.Maximum        = rowMaxIndex - 2;
                pb.Value          = 0;
                pb.Visible        = true;
                lblResult.Visible = false;
                OracleConnection theConnForTransaction = new OracleConnection(OracleDaoHelper.conn_str);
                theConnForTransaction.Open();
                OracleTransaction tran = theConnForTransaction.BeginTransaction();
                for (int rowIndex = 3; rowIndex <= rowMaxIndex; rowIndex++)
                {
                    seq_p_c_record = uEHelper.getSpecificCellValue("A" + rowIndex);
                    string prepared_Summary_process = uEHelper.getSpecificCellValue("B" + rowIndex).Trim();
                    specific_process = uEHelper.getSpecificCellValue("C" + rowIndex);
                    man_hours        = uEHelper.getSpecificCellValue("D" + rowIndex);
                    labour_cost      = uEHelper.getSpecificCellValue("E" + rowIndex);
                    if (string.IsNullOrEmpty(seq_p_c_record))
                    {
                        break;
                    }
                    if (string.IsNullOrEmpty(specific_process))
                    {
                        break;
                    }
                    ;
                    if (string.IsNullOrEmpty(man_hours))
                    {
                        break;
                    }
                    ;
                    if (string.IsNullOrEmpty(labour_cost))
                    {
                        break;
                    }
                    ;
                    //若主工序不为空
                    if (!"".Equals(prepared_Summary_process))
                    {
                        summary_process = prepared_Summary_process;
                    }
                    //插入该大类中的第一行数据。
                    sqlStr = string.Format(@"INSERT INTO Products_Cost(SEQ,SEQ_P_C_RECORD,Product_Name,Summary_Process,Specific_Process,Man_hours,Labour_cost,Supplier)
                                            VALUES(SEQ_Products_Cost.nextVal,'{0}','{1}','{2}','{3}','{4}','{5}','{6}')",
                                           seq_p_c_record,
                                           PN,
                                           summary_process,
                                           specific_process,
                                           man_hours,
                                           labour_cost,
                                           Program._userInfo.User_Name);
                    try
                    {
                        OracleDaoHelper.executeSQLThrowExceptioin(sqlStr, theConnForTransaction);
                    }
                    catch (Exception ex)
                    {
                        if (ex.ToString().Contains("ORA-00001"))
                        {
                            MessageBox.Show(wS.Index + "." + wS.Name + ": 第" + rowIndex + "行为重复工序,请检查成本表格,请重新导入 . ", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            tran.Rollback();
                            theConnForTransaction.Close();
                            lblPromptForPB.Visible = false;
                            pb.Visible             = false;
                            myExcel.close();
                            break;
                        }
                        MessageBox.Show(wS.Index + "." + wS.Name + ": 第" + rowIndex + "行,数据导入时发生异常,请检查成本表格,重新导入。" + ex.ToString(), "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        tran.Rollback();
                        theConnForTransaction.Close();
                        lblPromptForPB.Visible = false;
                        pb.Visible             = false;
                        myExcel.close();
                        break;
                    }
                    lblPromptForPB.Visible = true;
                    lblPromptForPB.Text    = wS.Index + "." + wS.Name + ": ";
                    pb.Value++;
                    continue;
                }
                tran.Commit();
                theConnForTransaction.Close();
                pb.Visible             = false;
                lblPromptForPB.Visible = false;
                lblPromptForPB.Text    = "";
                lblResult.Visible      = true;
                IShowProductsCostDetail showProductsCostDetailImpl = new ShowProductsCostDetailImpl();
                this.dgv.DataSource = showProductsCostDetailImpl.getProductsDetail(PN);
                DGVHelper.AutoSizeForDGV(dgv);
            }
            myExcel.close();
            if (notProductsCostFile_Count == wSList.Count)
            {
                ShowResult.show(lblResult, "   共" + wSList.Count + "个表格均非成衣成本文件!依据:第3行4列和第3行5列均非数字!", false);
                timerRestoreLblResult.Enabled = true;
                lblPromptForPB.Visible        = false;
            }
        }
        /// <summary>
        ///
        /// </summary>
        private void separateOutputAR()
        {
            string _defaultDir = System.Windows.Forms.Application.StartupPath + "\\考勤汇总";

            killHwndOfXls();
            Queue <int> prefix_Of_Staffs_Queue = V_AR_RESULT.get_Prefix_Staffs(YearAndMonthStr);

            if (prefix_Of_Staffs_Queue.Count == 0)
            {
                ShowResult.show(lblResult, "尚未导入本月的考勤记录!", false);
                timerRestoreTheLblResult.Enabled = true;
                return;
            }
            string prefix_Of_Staffs = string.Empty;

            //分几个工作表储存。
            while (prefix_Of_Staffs_Queue.Count > 0)
            {
                prefix_Of_Staffs = prefix_Of_Staffs_Queue.Dequeue().ToString();
                string _fileName = YearAndMonthStr + "_考勤汇总" + prefix_Of_Staffs.Substring(0, 1) + ".xls";
                if (!xlsFilePath.Contains(":"))
                {
                    //导出到Excel中
                    xlsFilePath = FileNameDialog.getSaveFileNameWithDefaultDir("考勤汇总:", "*.xls|*.xls", _defaultDir, _fileName);
                    if (!xlsFilePath.Contains(@"\"))
                    {
                        return;
                    }
                }
                else
                {
                    int index = xlsFilePath.LastIndexOf(string.Format(@"{0}_考勤汇总", YearAndMonthStr));
                    xlsFilePath = xlsFilePath.Remove(index) + _fileName;
                }
                //int index = xlsFilePath.LastIndexOf(string.Format(@"{0}_考勤汇总", YearAndMonthStr));
                //创建文件
                //DirectoryHelper.createFile(xlsFilePath);
                //xlsFilePath = xlsFilePath.Remove(index) + _fileName;
                MyExcel myExcel = new MyExcel(xlsFilePath);
                myExcel.create();
                myExcel.open();
                //追加Hwnd到队列中.
                hwndOfXls_Queue.Enqueue(myExcel.HwndOfApp);
                MSG msg = new MSG();
                //prefix_Of_Staffs = prefix_Of_Staffs_Queue.Dequeue().ToString();
                //依据前缀和月份获取列表。
                //获取第一张表
                Worksheet          _firstWS = myExcel.getFirstWorkSheetAfterOpen();
                Usual_Excel_Helper uEHelper = new Usual_Excel_Helper(_firstWS);
                uEHelper.clearAllContents(_firstWS.UsedRange);
                //清空该文档中的内容。
                Worksheet _secondWS = myExcel.getSecondWorksheetAfterOpen();
                uEHelper = new Usual_Excel_Helper(_secondWS);
                uEHelper.clearAllContents(_secondWS.UsedRange);
                Worksheet _thirdWS = myExcel.getThirdWorksheetAfterOpen();
                uEHelper = new Usual_Excel_Helper(_thirdWS);
                uEHelper.clearAllContents(_thirdWS.UsedRange);
                int machine_no = int.Parse(prefix_Of_Staffs.Substring(0, 1));
                //获取一个月内,某考勤机的考勤天数
                int nums_of_ar_days = GetARSummary.GetARSummary.get_nums_of_ar_days(machine_no, YearAndMonthStr);
                //考勤机的考勤天数
                int nums_of_staffs = GetARSummary.GetARSummary.get_nums_of_staffs(machine_no, YearAndMonthStr);
                System.Data.DataTable dt_Staff_Info       = GetARSummary.GetARSummary.get_Staff_info(YearAndMonthStr, machine_no);
                System.Data.DataTable dt_AR_Of_Each_Staff = GetARSummary.GetARSummary.get_AR_Of_Each_Staff(YearAndMonthStr, machine_no);
                System.Data.DataTable dt_AR_Summary       = GetARSummary.GetARSummary.Get_AR_Summary(YearAndMonthStr, machine_no);
                //隐藏 结果 label;
                lblResult.Visible = false;
                lblPrompt.Visible = true;
                lblPrompt.Text    = "考勤机" + prefix_Of_Staffs.Substring(0, 1) + ": 员工信息汇总中...";
                ExcelHelper.saveDtToExcelWithProgressBar(dt_Staff_Info, _firstWS, pb);
                lblPrompt.Text = "考勤机" + prefix_Of_Staffs.Substring(0, 1) + ": 考勤记录汇总中...";
                ExcelHelper.saveDtToExcelWithProgressBar(dt_AR_Of_Each_Staff, _secondWS, pb);
                lblPrompt.Text = "考勤机" + prefix_Of_Staffs.Substring(0, 1) + ": 汇总中...";
                ExcelHelper.saveDtToExcelWithProgressBar(dt_AR_Summary, _thirdWS, pb);
                Microsoft.Office.Interop.Excel.Range range_Src_AR;
                //目标 区域
                Microsoft.Office.Interop.Excel.Range range_desc_AR;
                //AR_Time 在D列存放
                Usual_Excel_Helper uEHelper_firstWS = new Usual_Excel_Helper(_firstWS);
                for (int i = 1; i <= nums_of_staffs; i++)
                {
                    range_Src_AR = ((Microsoft.Office.Interop.Excel.Range)_secondWS.Range[_secondWS.Cells[(i - 1) * (nums_of_ar_days) + 2, 4], _secondWS.Cells[i * nums_of_ar_days + 1]]);
                    range_Src_AR.Copy();
                    //第一张sheet,第4列
                    range_desc_AR = ((Microsoft.Office.Interop.Excel.Range)_firstWS.Cells[i + 1, 4]);
                    uEHelper_firstWS.pasteByTranspose(range_desc_AR);
                }
                //关闭excel
                myExcel.save();
                myExcel.close();
            }
            lblResult.Visible = true;
            lblPrompt.Visible = false;
        }
    private void HandleAdResult(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:

            watchedOnceAd     = true;
            aniComponent.clip = barAnim;
            aniComponent.Play();
            gotPwrupSound.Play();

            pwrRandomSelectorVariable = Random.Range(0, 10);                 // i.e. including 0 to 9.9999 ( excluding 10)

            img2.DOFade(100f, 0.1f);

            if (pwrRandomSelectorVariable >= 0 && pwrRandomSelectorVariable <= 2)
            {
                pwrupReferenceImages [0].SetActive(true);
                pwrupReferenceImages [1].SetActive(false);
                pwrupReferenceImages [2].SetActive(false);
                pwrupReferenceImages [3].SetActive(false);

                textAdSuccessPwrup.text = "PERK : MAGNET !!!";
            }

            if (pwrRandomSelectorVariable > 2 && pwrRandomSelectorVariable <= 4)
            {
                pwrupReferenceImages [0].SetActive(false);
                pwrupReferenceImages [1].SetActive(true);
                pwrupReferenceImages [2].SetActive(false);
                pwrupReferenceImages [3].SetActive(false);

                textAdSuccessPwrup.text = "PERK : JET !!!";
            }

            if (pwrRandomSelectorVariable > 4 && pwrRandomSelectorVariable <= 8)
            {
                pwrupReferenceImages [0].SetActive(false);
                pwrupReferenceImages [1].SetActive(false);
                pwrupReferenceImages [2].SetActive(true);
                pwrupReferenceImages [3].SetActive(false);

                textAdSuccessPwrup.text = "PERK : COIN BOOM !!!";
            }

            if (pwrRandomSelectorVariable > 8 && pwrRandomSelectorVariable <= 10)
            {
                pwrupReferenceImages [0].SetActive(false);
                pwrupReferenceImages [1].SetActive(false);
                pwrupReferenceImages [2].SetActive(false);
                pwrupReferenceImages [3].SetActive(true);

                textAdSuccessPwrup.text = "PERK : EXTRA LIFE !!!";
            }



            // player gains gems
            break;

        case ShowResult.Skipped:



            // player didnt watched the full ad
            break;

        case ShowResult.Failed:



            // player wasnt able to load the ad ? internet?!
            break;
        }
    }
Exemple #35
0
 private void OnAdClosed(ShowResult result)
 {
     Debug.Log("Regular ad closed");
 }
Exemple #36
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     Enabled = true;
     SoundManager.Lowpass = false; // Unmute
 }
Exemple #37
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     onFinished?.Invoke();
 }
Exemple #38
0
 void FinishHandler(ShowResult result)
 {
     Platform.m_Placeholder.onFinish -= FinishHandler;
     _showOptions?.finishCallback(result);
 }
        /// <summary>
        /// 导入
        /// </summary>
        public void import_P_C_Record_Template()
        {
            string xlsFilePath = FileNameDialog.getSelectedFilePathWithDefaultDir("请选择成衣成本记录:", "*.xls,*.xlsx|*.xls;*.xlsx", defaultDir);

            if (string.IsNullOrEmpty(xlsFilePath))
            {
                return;
            }
            if (!File.Exists(xlsFilePath))
            {
                return;
            }
            tbPath.Text = xlsFilePath;
            MyExcel myExcel = new MyExcel(xlsFilePath);

            myExcel.open();
            Tools.AppManagement.add(myExcel.HwndOfApp);
            Worksheet firstWS = myExcel.getFirstWorkSheetAfterOpen();
            int       notProductsCostFile_Count = 0;

            //非成本文件,则忽略。
            if (!isProductsCostRecordOfGroup1(firstWS))
            {
                notProductsCostFile_Count++;
                lblPromptForPB.Visible = false;
                ShowResult.show(lblResult, "   第1个表格非成衣成本文件!依据:第4行3列和第4行4列均非数字!", false);
                myExcel.close();
                return;
            }
            Usual_Excel_Helper uEHelper = new Usual_Excel_Helper(firstWS);
            string             PN       = uEHelper.getSpecificCellValue("A1");

            if ("请在此填写成品名称".Equals(PN))
            {
                MessageBox.Show(firstWS.Index + "." + firstWS.Name + ":  请填写成品名称!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (string.IsNullOrEmpty(PN))
            {
                MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 产品名称不能为空!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //判断是否存在该成品的记录
            string sqlStr = string.Format(@"SELECT 1 FROM Products_Cost WHERE Product_Name = '{0}'", PN);

            System.Data.DataTable dt = OracleDaoHelper.getDTBySql(sqlStr);
            if (dt.Rows.Count > 0)
            {
                //删除文档
                sqlStr = string.Format(@"DELETE FROM Products_Cost where Product_Name = '{0}'", PN);
                OracleDaoHelper.executeSQL(sqlStr);
            }
            //先导入概要工序。
            int rowMaxIndexOfGroup1 = uEHelper.getTheMaxRowIndexUntilBlankCellOfTheSpecificCol(1);
            int rowMaxIndexOfGroup2 = 0;
            //判断是否存在=
            bool ifExistsGroup2 = isProductsCostRecordOfGroup2(firstWS);

            if (ifExistsGroup2)
            {
                rowMaxIndexOfGroup2 = uEHelper.getTheMaxRowIndexUntilBlankCellOfTheSpecificCol(6);
            }
            //获取第3行
            //int rowMaxIndex = firstWS.UsedRange.RofirstWS.Count;
            pb.Maximum        = rowMaxIndexOfGroup1 - 2 + rowMaxIndexOfGroup2 - 2;
            pb.Value          = 0;
            pb.Visible        = true;
            lblResult.Visible = false;
            OracleConnection theConnForTransaction = new OracleConnection(OracleDaoHelper.conn_str);

            theConnForTransaction.Open();
            OracleTransaction tran = theConnForTransaction.BeginTransaction();
            string            prepared_Summary_process = string.Empty;

            //先读取第4列的内容。
            for (int rowIndex = 3; rowIndex <= rowMaxIndexOfGroup1; rowIndex++)
            {
                string seq_p_c_record = uEHelper.getSpecificCellValue("A" + rowIndex);
                //序号为空跳出循环。
                if (string.IsNullOrEmpty(seq_p_c_record))
                {
                    break;
                }
                string content_B_Col = uEHelper.getSpecificCellValue("B" + rowIndex).Trim();
                //1.读取C列内容,如果为空,说明是主工序。
                string content_C_Col = uEHelper.getSpecificCellValue("C" + rowIndex);
                if (string.IsNullOrEmpty(content_C_Col))
                {
                    //执行下一次循环。
                    prepared_Summary_process = content_B_Col;
                    continue;
                }
                string specific_process = content_B_Col;
                //2. C列不为空。
                string man_hours   = content_C_Col;
                string labour_cost = uEHelper.getSpecificCellValue("D" + rowIndex);

                if (string.IsNullOrEmpty(specific_process))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(man_hours))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(labour_cost))
                {
                    break;
                }
                ;
                //插入该大类中的第一行数据。
                sqlStr = string.Format(@"INSERT INTO Products_Cost(SEQ,SEQ_P_C_RECORD,Product_Name,Summary_Process,Specific_Process,Man_hours,Labour_cost,Supplier)
                                        VALUES(SEQ_Products_Cost.nextVal,'{0}','{1}','{2}','{3}','{4}','{5}','{6}')",
                                       seq_p_c_record,
                                       PN,
                                       prepared_Summary_process,
                                       specific_process,
                                       man_hours,
                                       labour_cost,
                                       Program._userInfo.User_Name);
                try
                {
                    OracleDaoHelper.executeSQLThrowExceptioin(sqlStr, theConnForTransaction);
                }
                catch (Exception ex)
                {
                    if (ex.ToString().Contains("ORA-00001"))
                    {
                        MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行为重复工序,请检查成本表格,请重新导入 . ", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        tran.Rollback();
                        theConnForTransaction.Close();
                        lblPromptForPB.Visible = false;
                        pb.Visible             = false;
                        myExcel.close();
                        return;
                    }
                    MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行,数据导入时发生异常,请检查成本表格,重新导入。" + ex.ToString(), "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    tran.Rollback();
                    theConnForTransaction.Close();
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    myExcel.close();
                    return;
                }
                lblPromptForPB.Visible = true;
                lblPromptForPB.Text    = firstWS.Index + "." + firstWS.Name + ": ";
                pb.Value++;
                continue;
            }
            //先读取第9列的内容。
            for (int rowIndex = 3; rowIndex <= rowMaxIndexOfGroup2; rowIndex++)
            {
                string seq_p_c_record = uEHelper.getSpecificCellValue("F" + rowIndex);
                //序号为空跳出循环。
                if (string.IsNullOrEmpty(seq_p_c_record))
                {
                    break;
                }
                string content_G_Col = uEHelper.getSpecificCellValue("G" + rowIndex).Trim();
                //1.读取C列内容,如果为空,说明是主工序。
                string content_H_Col = uEHelper.getSpecificCellValue("H" + rowIndex);
                if (string.IsNullOrEmpty(content_H_Col))
                {
                    //执行下一次循环。
                    prepared_Summary_process = content_G_Col;
                    continue;
                }
                string specific_process = content_G_Col;
                //2. C列不为空。
                string man_hours   = content_H_Col;
                string labour_cost = uEHelper.getSpecificCellValue("I" + rowIndex);

                if (string.IsNullOrEmpty(specific_process))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(man_hours))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(labour_cost))
                {
                    break;
                }
                ;
                //插入该大类中的第一行数据。
                sqlStr = string.Format(@"INSERT INTO Products_Cost(SEQ,SEQ_P_C_RECORD,Product_Name,Summary_Process,Specific_Process,Man_hours,Labour_cost,Supplier)
                                        VALUES(SEQ_Products_Cost.nextVal,'{0}','{1}','{2}','{3}','{4}','{5}','{6}')",
                                       seq_p_c_record,
                                       PN,
                                       prepared_Summary_process,
                                       specific_process,
                                       man_hours,
                                       labour_cost,
                                       Program._userInfo.User_Name);
                try
                {
                    OracleDaoHelper.executeSQLThrowExceptioin(sqlStr, theConnForTransaction);
                }
                catch (Exception ex)
                {
                    if (ex.ToString().Contains("ORA-00001"))
                    {
                        MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行为重复工序,请检查成本表格,请重新导入 . ", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        tran.Rollback();
                        theConnForTransaction.Close();
                        lblPromptForPB.Visible = false;
                        pb.Visible             = false;
                        myExcel.close();
                        return;
                    }
                    MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行,数据导入时发生异常,请检查成本表格,重新导入。" + ex.ToString(), "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    tran.Rollback();
                    theConnForTransaction.Close();
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    myExcel.close();
                    return;
                }
                lblPromptForPB.Visible = true;
                lblPromptForPB.Text    = firstWS.Index + "." + firstWS.Name + ": ";
                pb.Value++;
                continue;
            }
            tran.Commit();
            theConnForTransaction.Close();

            pb.Visible             = false;
            lblPromptForPB.Visible = false;
            lblPromptForPB.Text    = "";
            lblResult.Visible      = true;
            IShowProductsCostDetail showProductsCostDetailImpl = new ShowProductsCostDetailImpl();

            this.dgv.DataSource = showProductsCostDetailImpl.getProductsDetail(PN);
            DGVHelper.AutoSizeForDGV(dgv);
            myExcel.close();
            //ShowResult.show(lblResult, "   第1个表格非成衣成本文件!依据:第3行4列和第3行5列均非数字!", false);
            ShowResult.show(lblResult, "   导入完成!", true);
            timerRestoreLblResult.Enabled = true;
        }
Exemple #40
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     CollectReward(quest, 2);
     Destroy(gameObject);
 }
        private void toAWholePiece()
        {
            killHwndOfXls();
            Queue <int> prefix_Of_Staffs_Queue = V_AR_RESULT.get_Prefix_Staffs(YearAndMonthStr);

            if (prefix_Of_Staffs_Queue.Count == 0)
            {
                ShowResult.show(lblResult, "尚未导入本月的考勤记录!", false);
                timerRestoreTheLblResult.Enabled = true;
                return;
            }
            MSG msg = new MSG();
            ApplicationClass app = new ApplicationClass();
            //追加Hwnd到队列中.
            int appHwnd = app.Hwnd;

            app.Visible = false;
            Workbook  wBook       = app.Workbooks.Add(true);
            Worksheet wSheet      = (Worksheet)wBook.Worksheets[1];
            string    _defaultDir = System.Windows.Forms.Application.StartupPath + "\\考勤汇总";
            int       seq         = prefix_Of_Staffs_Queue.Dequeue();
            int       lastSeq     = 0;

            while (prefix_Of_Staffs_Queue.Count >= 1)
            {
                lastSeq = prefix_Of_Staffs_Queue.Dequeue();
            }
            string _fileName = YearAndMonthStr + "_考勤汇总" + seq.ToString() + "-" + lastSeq.ToString() + ".xls";

            if (!xlsFilePath.Contains(":"))
            {
                //导出到Excel中
                xlsFilePath = FileNameDialog.getSaveFileNameWithDefaultDir("考勤汇总:", "*.xls|*.xls", _defaultDir, _fileName);
                if (!xlsFilePath.Contains(@"\"))
                {
                    return;
                }
            }
            //依据前缀和月份获取列表。
            //获取该月该考勤机的出勤人数。
            int AR_Num = V_AttendanceRecord.getARNumByYearAndMonth(YearAndMonthStr);

            if (AR_Num == 0)
            {
                MessageBox.Show("数据源为空,无法导出。", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            int rowMaxCount = AR_Num * 2 + 6;
            int colMaxCount = AttendanceR.get_AR_Days_Num(YearAndMonthStr);

            //写标题
            try
            {
                //每行格式设置,注意标题占一行。
                Range range = wSheet.get_Range(wSheet.Cells[1, 1], wSheet.Cells[rowMaxCount + 1, colMaxCount + 1]);
                //设置单元格为文本。
                range.NumberFormatLocal = "@";
                //水平对齐方式
                range.HorizontalAlignment = XlHAlign.xlHAlignCenter;
                //第一行写考勤分析结果。
                wSheet.Cells[1, 1] = YearAndMonthStr + " 考勤分析结果" + seq.ToString() + "-" + lastSeq.ToString();
                //获取该日期详细的考勤记录。
                #region
                V_AttendanceRecord.AR_Properties aR_Properties = V_AttendanceRecord.getARProperties(YearAndMonthStr);
                //第三行:考勤时间
                wSheet.Cells[3, 1] = "考勤时间";
                wSheet.Cells[3, 3] = String.Format(@"{0} ~ {1}",
                                                   aR_Properties.Start_Date,
                                                   aR_Properties.End_Date);
                wSheet.Cells[3, 10] = "制表时间";
                wSheet.Cells[3, 12] = aR_Properties.Tabulation_date;
                #endregion
                List <int> dayList = V_AR_DETAIL.getMonthAL_By_YAndM(YearAndMonthStr);
                //需要统计有多少人。
                int total_num_of_AttendanceR = AttendanceR.get_Total_Num_Of_Staffs_By_YAndM(YearAndMonthStr);
                pb.Value          = 0;
                pb.Maximum        = dayList.Count + dayList.Count * total_num_of_AttendanceR;
                pb.Visible        = true;
                lblPrompt.Text    = _fileName + ":";
                lblPrompt.Visible = true;
                //写 此月与考勤相关的日。
                for (int i = 0; i <= dayList.Count - 1; i++)
                {
                    //写该月的具体有哪些日:1,2,3.与考勤相关。
                    wSheet.Cells[4, i + 1] = dayList[i].ToString();
                    pb.Value++;
                }
                //实际出勤天数.
                wSheet.Cells[4, dayList.Count + 1] = "实际出勤天数";
                //事假
                wSheet.Cells[4, dayList.Count + 2] = "事假";
                //未打卡
                wSheet.Cells[4, dayList.Count + 3] = "未打卡";
                //延点
                wSheet.Cells[4, dayList.Count + 4] = "延点(小时)";
                //迟到
                wSheet.Cells[4, dayList.Count + 5] = "迟到";
                //早退
                wSheet.Cells[4, dayList.Count + 6] = "早退";
                //餐补
                wSheet.Cells[4, dayList.Count + 7] = "餐补";
                string             AR_YEAR_AND_Month_Str = String.Empty;
                string             AR_Day = string.Empty;
                List <V_AR_DETAIL> v_AR_Detail_Specific_Day_List = null;
                for (int j = 1; j <= dayList.Count; j++)
                {
                    AR_YEAR_AND_Month_Str = aR_Properties.Start_Date.Substring(0, 8);
                    AR_Day = AR_YEAR_AND_Month_Str + dayList[j - 1].ToString().PadLeft(2, '0');
                    v_AR_Detail_Specific_Day_List = V_AR_DETAIL.get_V_AR_Detail_By_Specific_Day(AR_Day);
                    //按日取。
                    for (int i = 0; i <= v_AR_Detail_Specific_Day_List.Count - 1; i++)
                    {
                        V_AR_DETAIL v_AR_Detail = v_AR_Detail_Specific_Day_List[i];
                        if (j == 1)
                        {
                            //第五行写工号。
                            wSheet.Cells[5 + i * 2, 1] = "工号";
                            //获取原始的工号,没有前缀。
                            wSheet.Cells[5 + i * 2, 3] = "'" + v_AR_Detail.Job_number;
                            //9
                            wSheet.Cells[5 + i * 2, 9] = "姓名";
                            //11
                            wSheet.Cells[5 + i * 2, 11] = v_AR_Detail.Name;
                            //19
                            wSheet.Cells[5 + i * 2, 19] = "部门";
                            //21
                            wSheet.Cells[5 + i * 2, 21] = v_AR_Detail.Dept;
                            V_Summary_OF_AR       v_summary_of_ar = new V_Summary_OF_AR(v_AR_Detail.Job_number, YearAndMonthStr);
                            System.Data.DataTable dtARSummary     = v_summary_of_ar.getSummaryOFAR();
                            //实际出勤天数.
                            wSheet.Cells[6 + i * 2, dayList.Count + 1] = dtARSummary.Rows[0]["AR_DAYS"].ToString();
                            //事假
                            string vacatioin_total_time = dtARSummary.Rows[0]["VACATION_TOTAL_TIME"].ToString();
                            wSheet.Cells[6 + i * 2, dayList.Count + 2] = "0".Equals(vacatioin_total_time) ? "" : vacatioin_total_time;
                            string not_Finger_Print_num = dtARSummary.Rows[0]["NOT_FINGERPRINT_TIMES"].ToString();
                            //未打卡
                            wSheet.Cells[6 + i * 2, dayList.Count + 3] = "0".Equals(not_Finger_Print_num) ? "" : not_Finger_Print_num;
                            string delayTime = dtARSummary.Rows[0]["DELAY_TOTAL_TIME"].ToString();
                            //延点
                            wSheet.Cells[6 + i * 2, dayList.Count + 4] = "0.0".Equals(delayTime) ? "" : delayTime;
                            string come_late_Num = dtARSummary.Rows[0]["COME_LATE_NUM"].ToString();
                            //迟到
                            wSheet.Cells[6 + i * 2, dayList.Count + 5] = "0".Equals(come_late_Num) ? "" : come_late_Num;
                            string leave_early_num = dtARSummary.Rows[0]["LEAVE_EARLY_NUM"].ToString();
                            //早退
                            wSheet.Cells[6 + i * 2, dayList.Count + 6] = "0".Equals(leave_early_num) ? "" : leave_early_num;
                            //餐补
                            wSheet.Cells[6 + i * 2, dayList.Count + 7] = dtARSummary.Rows[0]["DINNER_SUBSIDY_NUM"].ToString();
                        }
                        System.Data.DataTable dt = V_AR_Time_Helper.getARTime(v_AR_Detail.Job_number, AR_Day);
                        string tempStr           = String.Empty;
                        int    length            = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1.ToString().Length;
                        for (int k = 0; k <= dt.Rows.Count - 1; k++)
                        {
                            //先设置颜色.
                            if ("0".Equals(dt.Rows[k]["FLAG"].ToString()))
                            {
                                if ("1".Equals(dt.Rows[k]["COME_LATE_NUM"].ToString())) //迟到
                                {
                                    //先计算单元格已有字符长度。
                                    length = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1.ToString().Length;
                                    //迟到
                                    tempStr = dt.Rows[k]["TIME"].ToString() + (k < dt.Rows.Count - 1 ? "\r\n" : "");
                                    ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 + tempStr;
                                    ((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.Color = -16776961;
                                    continue;
                                }
                                if ("1".Equals(dt.Rows[k]["LEAVE_EARLY_NUM"].ToString()))
                                {
                                    //先计算单元格已有字符长度。
                                    length = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1.ToString().Length;
                                    //早退
                                    tempStr = dt.Rows[k]["TIME"].ToString() + (k < dt.Rows.Count - 1 ? "\r\n" : "");
                                    ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 + tempStr;
                                    //写完即改变前景色。
                                    ((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.Color = -16776961;
                                    continue;
                                }
                                //先计算单元格已有字符长度。
                                length = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1.ToString().Length;
                                //正常
                                //正常上班点.
                                tempStr = dt.Rows[k]["TIME"].ToString() + (k < dt.Rows.Count - 1 ? "\r\n" : "");
                                ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 + tempStr;
                                ((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.Color = System.Drawing.Color.FromArgb(0, 0, 0).ToArgb();
                                continue;
                            }
                            //先计算单元格已有字符长度。
                            length = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1.ToString().Length;
                            //请假点。
                            tempStr = "<" + dt.Rows[k]["TIME"].ToString() + ">" + (k < (dt.Rows.Count - 1) ? "\r\n" : "");
                            ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 = ((Range)wSheet.Cells[6 + i * 2, j]).FormulaR1C1 + tempStr;
                            //((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.Bold = true;
                            //((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.ThemeColor = XlThemeColor.xlThemeColorDark1;
                            //((Range)wSheet.Cells[6 + i * 2, j]).Characters[length + 1, 5].Font.Color = -16776961;
                        }
                        pb.Value++;
                    }
                }
                rowMaxCount = wSheet.UsedRange.Rows.Count;
                //休息日,背景色变为浅绿色。
                for (int j = 1; j <= dayList.Count; j++)
                {
                    bool ifRestDay = false;
                    AR_YEAR_AND_Month_Str = aR_Properties.Start_Date.Substring(0, 8);
                    AR_Day    = AR_YEAR_AND_Month_Str + dayList[j - 1].ToString().PadLeft(2, '0');
                    ifRestDay = Have_A_Rest_Helper.ifDayOfRest(AR_Day);
                    if (ifRestDay)
                    {
                        //此列背景色改为:

                        /*
                         *  ange("AF102").Select
                         *  With Selection.Interior
                         *      .Pattern = xlSolid
                         *      .PatternColorIndex = xlAutomatic
                         *       .ThemeColor = xlThemeColorAccent3
                         *       .TintAndShade = 0.599993896298105
                         *      .PatternTintAndShade = 0
                         *  End With
                         * End Sub
                         */
                        Range rangeRestDay = wSheet.get_Range(wSheet.Cells[4, j], wSheet.Cells[rowMaxCount, j]);
                        rangeRestDay.Interior.Pattern             = XlPattern.xlPatternSolid;
                        rangeRestDay.Interior.PatternColorIndex   = XlPattern.xlPatternAutomatic;
                        rangeRestDay.Interior.ThemeColor          = XlThemeColor.xlThemeColorAccent3;
                        rangeRestDay.Interior.TintAndShade        = 0.599993896298105;
                        rangeRestDay.Interior.PatternTintAndShade = 0;
                    }
                }
                //合并第一行
                Range rangeTitle = wSheet.get_Range(wSheet.Cells[1, 1], wSheet.Cells[1, dayList.Count + 7]);
                rangeTitle.Merge();
                rangeTitle.HorizontalAlignment = XlHAlign.xlHAlignCenter;
                rangeTitle.VerticalAlignment   = XlVAlign.xlVAlignCenter;
                pb.Visible        = false;
                lblPrompt.Visible = false;
                //自动调整列宽
                //range.EntireColumn.AutoFit();
                //设置禁止弹出保存和覆盖的询问提示框
                app.DisplayAlerts          = false;
                app.AlertBeforeOverwriting = false;
                //保存excel文档并关闭
                wBook.SaveAs(xlsFilePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
                wBook.Close(true, xlsFilePath, Type.Missing);
                //退出Excel程序
                app.Quit();
                //释放资源
                System.Runtime.InteropServices.Marshal.ReleaseComObject(range);
                System.Runtime.InteropServices.Marshal.ReleaseComObject(wSheet);
                System.Runtime.InteropServices.Marshal.ReleaseComObject(wBook);
                System.Runtime.InteropServices.Marshal.ReleaseComObject(app);
                //调用GC的垃圾收集方法
                GC.Collect();
                GC.WaitForPendingFinalizers();
                ShowResult.show(lblResult, "存于: " + xlsFilePath, true);
                timerRestoreTheLblResult.Enabled = true;
                //生成工作安排表。
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "提示消息:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }
Exemple #42
0
 private void onAdClosed(ShowResult result)
 {
 }
 public FinishEventArgs(string placementId, ShowResult showResult)
 {
     this.placementId = placementId;
     this.showResult  = showResult;
 }
Exemple #44
0
    public new static void HandleShowResult(ShowResult result)
    {
        UnityAdsHelper.HandleShowResult(result);

        LoadNextLevel();
    }
 public static void Unpause(ShowResult result)
 {
     //Quando o anuncio acabar, saia do modo pausado
     MenuPauseComp.pausado = false;
     Time.timeScale        = 1f;
 }
 public OnAdDoneEventArgs(string id, ShowResult res)
 {
     PlacementID  = id;
     AdShowResult = res;
 }
Exemple #47
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
 }
Exemple #48
0
 void NavigateScene(ShowResult showResult)
 {
     LoadScene();
 }
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     if (placementId == "Rewarded_Android" && showResult == ShowResult.Finished) //TODO: Update with your ad ID
     {
     }
 }
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     HandleSceneLoading();
 }
Exemple #51
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     RealLoadLevel();
 }
Exemple #52
0
 private static void Unpause(ShowResult obj)
 {
     //Quando o anuncio acabar
     //sai do modo paused
     LevelControllerComp.PauseGame(false);
 }
Exemple #53
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     HasBeenCalled = true;
     m_UnityAdsDidFinishCallback?.Invoke(placementId, showResult);
 }
 private void HandleShowResult(ShowResult result)
 {
     GameScript.Instance.rewardPoints = 50;
 }
Exemple #55
0
 public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
 {
     UnityMainThreadDispatcher.Instance().Enqueue(OnUnityAdsDidFinishCoro(placementId, showResult));
 }
Exemple #56
0
    // Verificação se os anuncios estão habilitados.
#if UNITY_ADS
    /// <summary>
    /// Função para despausar o jogo apos a execução do anuncio.
    /// </summary>
    /// <param name="_"> Varialvel passada por padrão, não sera usada nesta parte</param>
    public static void unPause(ShowResult _)
    {
        // Seta o time scale para um, para voltar a execução do jogo.
        Time.timeScale = 1;
    }
 private void RewardAdCallback(ShowResult result)
 {
     rewardedAdCallback.Invoke(result);
     rewardedAdStart = -1f;
     Debug.Log("Rew ad watched");
 }
Exemple #58
0
 private void HandleClosingOfAd(ShowResult result)
 {
     Debug.Log(string.Format("{0}", result.ToString()));
 }
Exemple #59
0
        /// <summary>
        /// 导出到Excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnExport_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(cbPN.Text.Trim()))
            {
                MessageBox.Show("您未选中成衣名称!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //加载图片
            cbPN_SelectedIndexChanged(sender, e);
            if (CmdHelper.ifExistsTheProcessByName("EXCEL"))
            {
                FrmCloseExcel frmCloseExcel = new FrmCloseExcel();
                frmCloseExcel.ShowDialog();
            }
            //导出到Excel中
            string _defaultDir = System.Windows.Forms.Application.StartupPath + "\\成本汇总";
            string _fileName   = cbPN.Text.Trim() + "_成本汇总.xls";

            xlsFilePath = FileNameDialog.getSaveFileNameWithDefaultDir("成衣汇总:", "*.xls|*.xls", _defaultDir, _fileName);
            if (!xlsFilePath.Contains(@"\"))
            {
                return;
            }
            //将图片存于粘贴板中。
            Clipboard.SetImage(pictureBox.Image);
            System.Data.DataTable dt = (System.Data.DataTable)dgv.DataSource;
            string PN = dt.Rows[0]["成衣名称"].ToString();

            ExcelHelper.saveDtToExcelWithProgressBar((System.Data.DataTable)dgv.DataSource, xlsFilePath, pb);
            MyExcel myExcel = new MyExcel(xlsFilePath);

            myExcel.open();
            Worksheet wS = myExcel.getFirstWorkSheetAfterOpen();


            //获取第二个Sheet.
            myExcel.App.Visible = false;
            Usual_Excel_Helper uEHelper = new Usual_Excel_Helper(wS);
            int maxRowCount             = wS.UsedRange.Rows.Count;

            uEHelper.insertAboveTheSpecificRow(1);
            uEHelper.setSpecificCellValue("A1", PN);
            Range range = (wS.Range)[wS.Cells[2, 2], wS.Cells[maxRowCount, 2]];

            uEHelper.delTheSpecificContentShiftToLeft(range);
            myExcel.App.DisplayAlerts = false;
            uEHelper.merge("A1", "G1");
            uEHelper.MergeTheSpecificColumnWithoutBlankContent(2);

            //保存图片到I1.
            Range rangeI1 = uEHelper.getRange("I1", "I1");

            /*
             *    ActiveSheet.Range("A1").PasteSpecial(
             *   Excel.Enums.XlPasteType.xlPasteAll,
             *   Excel.Enums.Xl‌​PasteSpecialOperation.xlPasteSpecialOperationNone,
             *   false, false);
             */
            rangeI1.Select();
            wS.PasteSpecial();

            //sheet2中写入文件.
            IShowProductsCostSummary iShowProductsCostSummary = new ShowProductsCostSummaryImpl();

            dt = iShowProductsCostSummary.get_P_C_Each_Port(cbPN.Text.Trim());

            //序号, 成衣名称,  概要工序,  指定工序, 指定每部位工序, 工时, 件数, 单价, 最终单价.

            /*
             *  seq_p_c_record,
             *  product_name,
             *  summary_process,
             *  specific_process,
             *  specific_each_process,
             *  man_hours,
             *  amount,
             *  each_cost,
             *  final_labour_cost
             */
            //第二个表格.
            myExcel.AddSheetToLastIndex("每部件成本汇总");
            Worksheet secondWS = myExcel.getSecondWorksheetAfterOpen();

            //先写标题。
            secondWS.Cells[1, 1]  = "序号";
            secondWS.Cells[1, 2]  = "成衣名称";
            secondWS.Cells[1, 3]  = "概要工序";
            secondWS.Cells[1, 4]  = "指定工序";
            secondWS.Cells[1, 5]  = "指定每部位工序";
            secondWS.Cells[1, 6]  = "工时";
            secondWS.Cells[1, 7]  = "件数";
            secondWS.Cells[1, 8]  = "单价";
            secondWS.Cells[1, 9]  = "工价";
            secondWS.Cells[1, 10] = "最终工价";

            for (int i = 0; i <= dt.Rows.Count - 1; i++)
            {
                secondWS.Cells[2 + i, 1]  = dt.Rows[i]["seq_p_c_record"].ToString();
                secondWS.Cells[2 + i, 2]  = dt.Rows[i]["product_name"].ToString();
                secondWS.Cells[2 + i, 3]  = dt.Rows[i]["summary_process"].ToString();
                secondWS.Cells[2 + i, 4]  = dt.Rows[i]["specific_process"].ToString();
                secondWS.Cells[2 + i, 5]  = dt.Rows[i]["specific_each_process"].ToString();
                secondWS.Cells[2 + i, 6]  = dt.Rows[i]["man_hours"].ToString();
                secondWS.Cells[2 + i, 7]  = dt.Rows[i]["amount"].ToString();
                secondWS.Cells[2 + i, 8]  = dt.Rows[i]["each_cost"].ToString();
                secondWS.Cells[2 + i, 9]  = dt.Rows[i]["labour_cost"].ToString();
                secondWS.Cells[2 + i, 10] = dt.Rows[i]["final_labour_cost"].ToString();
            }
            //获取最终单价的区域.
            Range _range_final_labour_cost;

            uEHelper = new Usual_Excel_Helper(secondWS);
            _range_final_labour_cost = uEHelper.getRange("J2", "J" + secondWS.UsedRange.Rows.Count);
            uEHelper.setFormulaR1C1ForRange(_range_final_labour_cost, "=IF(OR(ISBLANK(RC[-3]),ISBLANK(RC[-2])),RC[-1],RC[-3]*RC[-2])");

            secondWS.UsedRange.EntireColumn.AutoFit();
            myExcel.save();
            myExcel.close();
            //((FrmMainOfProductsCost)this.ParentForm).notifyIcon.ShowBalloonTip(7000, "提示:","汇总保存于: " + xlsFilePath, ToolTipIcon.Info);
            ShowResult.show(lblResult, "汇总保存于: " + xlsFilePath, true);
            timerRestoreLblResult.Start();
        }
        /// <summary>
        /// 导入
        /// </summary>
        public void import_P_C_Record_Of_First_Sheet()
        {
            //确认关闭已经打开的Excel
            if (CmdHelper.ifExistsTheProcessByName("EXCEL"))
            {
                FrmCloseExcel frmCloseExcel = new FrmCloseExcel();
                frmCloseExcel.ShowDialog();
            }
            string xlsFilePath = FileNameDialog.getSelectedFilePathWithDefaultDir("请选择成衣成本记录:", "*.xls,*.xlsx|*.xls;*.xlsx", defaultDir);

            if (string.IsNullOrEmpty(xlsFilePath))
            {
                return;
            }
            if (!File.Exists(xlsFilePath))
            {
                return;
            }
            tbPath.Text = xlsFilePath;
            MyExcel myExcel = new MyExcel(xlsFilePath);

            myExcel.open();
            Tools.AppManagement.add(myExcel.HwndOfApp);
            Worksheet firstWS = myExcel.getFirstWorkSheetAfterOpen();
            MSG       msg     = null;

            //非成本文件,则忽略。
            if (!(msg = isProductsCostRecord(firstWS)).Flag)
            {
                lblPromptForPB.Visible = false;
                ShowResult.show(lblResult, msg.Msg, false);
                myExcel.close();
                return;
            }
            Usual_Excel_Helper uEHelper = new Usual_Excel_Helper(firstWS);
            string             PN       = uEHelper.getSpecificCellValue("A1");

            if ("请在此填写成品名称".Equals(PN))
            {
                MessageBox.Show(firstWS.Index + "." + firstWS.Name + ":  请填写成品名称!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                myExcel.close();
                return;
            }
            if (string.IsNullOrEmpty(PN))
            {
                MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 产品名称不能为空!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                myExcel.close();
                return;
            }
            //判断是否存在该成品的记录
            string sqlStr = string.Format(@"SELECT 1 FROM Products_Cost WHERE Product_Name = '{0}'", PN);

            System.Data.DataTable dt = OracleDaoHelper.getDTBySql(sqlStr);
            if (dt.Rows.Count > 0)
            {
                //删除文档
                sqlStr = string.Format(@"DELETE FROM Products_Cost where Product_Name = '{0}'", PN);
                OracleDaoHelper.executeSQL(sqlStr);
            }
            //先导入概要工序。
            //最大行,取
            //从第二行开始,取第三列连续出现工序的最大行
            int rowMaxIndex = uEHelper.getTheMaxRowIndexUntilBlankCellOfTheSpecificCol(2, 3);
            //int rowMaxIndex = firstWS.UsedRange.RofirstWS.Count;
            string seq_p_c_record   = string.Empty;
            string summary_process  = string.Empty;
            string specific_process = string.Empty;
            string man_hours        = string.Empty;
            string labour_cost      = string.Empty;

            pb.Maximum        = rowMaxIndex - 2;
            pb.Value          = 0;
            pb.Visible        = true;
            lblResult.Visible = false;
            OracleConnection theConnForTransaction = new OracleConnection(OracleDaoHelper.conn_str);

            theConnForTransaction.Open();
            OracleTransaction tran = theConnForTransaction.BeginTransaction();

            //先删除Check_Products_Cost_Doc中的所有记录。
            CheckProductsCostDoc.deleteAllRecord();
            //检查工时数据,成本数据是否正确。
            for (int rowIndex = 3; rowIndex <= rowMaxIndex; rowIndex++)
            {
                seq_p_c_record = uEHelper.getSpecificCellValue("A" + rowIndex);
                string prepared_Summary_process = uEHelper.getSpecificCellValue("B" + rowIndex).Trim();
                specific_process = uEHelper.getSpecificCellValue("C" + rowIndex);
                man_hours        = uEHelper.getSpecificCellValue("D" + rowIndex);
                labour_cost      = uEHelper.getSpecificCellValue("E" + rowIndex);
                if (string.IsNullOrEmpty(seq_p_c_record))
                {
                    break;
                }
                if (string.IsNullOrEmpty(specific_process))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(man_hours))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(labour_cost))
                {
                    break;
                }
                //判断man_hours是否为decimal;
                decimal _man_hours_d;
                decimal _labour_cost_d;
                if (!decimal.TryParse(man_hours, out _man_hours_d))
                {
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    ShowResult.show(lblResult, string.Format(@"第{0}行第4列,非工时数据,请检查!", rowIndex), false);
                    timerRestoreLblResult.Enabled = true;
                    myExcel.close();
                    return;
                }
                if (!decimal.TryParse(labour_cost, out _labour_cost_d))
                {
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    ShowResult.show(lblResult, string.Format(@"第{0}行第5列,非单价数据,请检查!", rowIndex), false);
                    timerRestoreLblResult.Enabled = true;
                    myExcel.close();
                    return;
                }
                //若主工序不为空
                if (!"".Equals(prepared_Summary_process))
                {
                    summary_process = prepared_Summary_process;
                }
                CheckProductsCostDoc checkProductsCostDoc = new CheckProductsCostDoc(rowIndex, summary_process, specific_process);
                msg = checkProductsCostDoc.ifExistsSameProcess();
                if (msg.Flag)
                {
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    ShowResult.show(lblResult, string.Format(@"序号:{0}行与{1},工序相同,请检查。", seq_p_c_record, msg.Msg), false);
                    timerRestoreLblResult.Enabled = true;
                    myExcel.close();
                    return;
                }
                checkProductsCostDoc.addProcess();
                lblPromptForPB.Visible = true;
                lblPromptForPB.Text    = firstWS.Index + "." + firstWS.Name + " 检查中: ";
                pb.Value++;
            }
            pb.Value = 0;
            //保存工序数据到后台。
            for (int rowIndex = 3; rowIndex <= rowMaxIndex; rowIndex++)
            {
                seq_p_c_record = uEHelper.getSpecificCellValue("A" + rowIndex);
                string prepared_Summary_process = uEHelper.getSpecificCellValue("B" + rowIndex).Trim();
                specific_process = uEHelper.getSpecificCellValue("C" + rowIndex);
                man_hours        = uEHelper.getSpecificCellValue("D" + rowIndex);
                labour_cost      = uEHelper.getSpecificCellValue("E" + rowIndex);
                if (string.IsNullOrEmpty(seq_p_c_record))
                {
                    break;
                }
                if (string.IsNullOrEmpty(specific_process))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(man_hours))
                {
                    break;
                }
                ;
                if (string.IsNullOrEmpty(labour_cost))
                {
                    break;
                }
                //若主工序不为空
                if (!"".Equals(prepared_Summary_process))
                {
                    summary_process = prepared_Summary_process;
                }
                //插入该大类中的第一行数据。
                sqlStr = string.Format(@"INSERT INTO Products_Cost(SEQ,SEQ_P_C_RECORD,Product_Name,Summary_Process,Specific_Process,Man_hours,Labour_cost,Supplier)
                                        VALUES(SEQ_Products_Cost.nextVal,'{0}','{1}','{2}','{3}','{4}','{5}','{6}')",
                                       seq_p_c_record,
                                       PN,
                                       summary_process,
                                       specific_process,
                                       man_hours,
                                       labour_cost,
                                       Program._userInfo.User_Name);
                try
                {
                    OracleDaoHelper.executeSQLThrowExceptioin(sqlStr, theConnForTransaction);
                }
                catch (Exception ex)
                {
                    if (ex.ToString().Contains("ORA-00001"))
                    {
                        MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行为重复工序,请检查成本表格,请重新导入 . ", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        tran.Rollback();
                        theConnForTransaction.Close();
                        lblPromptForPB.Visible = false;
                        pb.Visible             = false;
                        myExcel.close();
                        return;
                    }
                    MessageBox.Show(firstWS.Index + "." + firstWS.Name + ": 第" + rowIndex + "行,数据导入时发生异常,请检查成本表格,重新导入。" + ex.ToString(), "提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    tran.Rollback();
                    theConnForTransaction.Close();
                    lblPromptForPB.Visible = false;
                    pb.Visible             = false;
                    myExcel.close();
                    return;
                }
                lblPromptForPB.Visible = true;
                lblPromptForPB.Text    = firstWS.Index + "." + firstWS.Name + " 导入中: ";
                pb.Value++;
                continue;
            }
            tran.Commit();
            theConnForTransaction.Close();
            pb.Visible             = false;
            lblPromptForPB.Visible = false;
            lblPromptForPB.Text    = "";
            lblResult.Visible      = true;
            IShowProductsCostDetail showProductsCostDetailImpl = new ShowProductsCostDetailImpl();

            this.dgv.DataSource = showProductsCostDetailImpl.getProductsDetail(PN);
            DGVHelper.AutoSizeForDGV(dgv);

            myExcel.close();
            ShowResult.show(lblResult, "已经提交!", true);
            timerRestoreLblResult.Enabled = true;
            lblPromptForPB.Visible        = false;
            //默认提交 pictures下的 waiting.jpg图片。
            //保存或更新其对应的图片。
            if (!FrmProductsCostSummary.ifExistsRecordOfProducts_Picture(PN))
            {
                FrmProductsCostSummary.addPictureOfProduct(PN, System.Windows.Forms.Application.StartupPath + "\\pictures\\waiting.jpg");
            }
            else
            {
                FrmProductsCostSummary.updatePictureOfProduct(PN, System.Windows.Forms.Application.StartupPath + "\\pictures\\waiting.jpg");
            }
        }