Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Address1 != null ? StringComparer.CurrentCulture.GetHashCode(Address1) : 0);
         hashCode = (hashCode * 397) ^ (Address2 != null ? StringComparer.CurrentCulture.GetHashCode(Address2) : 0);
         hashCode = (hashCode * 397) ^ (Address3 != null ? StringComparer.CurrentCulture.GetHashCode(Address3) : 0);
         hashCode = (hashCode * 397) ^ AutoBackup.GetHashCode();
         hashCode = (hashCode * 397) ^ AutoPrintLabels.GetHashCode();
         hashCode = (hashCode * 397) ^ (BackupFilePath != null ? StringComparer.CurrentCulture.GetHashCode(BackupFilePath) : 0);
         hashCode = (hashCode * 397) ^ CentreQuarterlyCheckDate.GetHashCode();
         hashCode = (hashCode * 397) ^ Created.GetHashCode();
         hashCode = (hashCode * 397) ^ IsGV212CheckEnabled.GetHashCode();
         hashCode = (hashCode * 397) ^ SendMonthlyReport.GetHashCode();
         hashCode = (hashCode * 397) ^ IsStatusReportCheckEnabled.GetHashCode();
         hashCode = (hashCode * 397) ^ (MainEmailAddress != null ? StringComparer.CurrentCulture.GetHashCode(MainEmailAddress) : 0);
         hashCode = (hashCode * 397) ^ MonthlyGV212Date.GetHashCode();
         hashCode = (hashCode * 397) ^ (Office != null ? StringComparer.CurrentCulture.GetHashCode(Office) : 0);
         hashCode = (hashCode * 397) ^ (PhoneNumber != null ? StringComparer.CurrentCulture.GetHashCode(PhoneNumber) : 0);
         hashCode = (hashCode * 397) ^ (PostCode != null ? StringComparer.CurrentCulture.GetHashCode(PostCode) : 0);
         hashCode = (hashCode * 397) ^ (SecondaryEmailAddress != null ? StringComparer.CurrentCulture.GetHashCode(SecondaryEmailAddress) : 0);
         hashCode = (hashCode * 397) ^ (Town != null ? StringComparer.CurrentCulture.GetHashCode(Town) : 0);
         hashCode = (hashCode * 397) ^ Uploaded.GetHashCode();
         hashCode = (hashCode * 397) ^ UserId;
         hashCode = (hashCode * 397) ^ (WorkshopName != null ? StringComparer.CurrentCulture.GetHashCode(WorkshopName) : 0);
         return(hashCode);
     }
 }
Beispiel #2
0
 public void ResetCache()
 {
     foreach (List <long> Uploaded in UploadedKeys)
     {
         Uploaded.Clear();
     }
 }
Beispiel #3
0
        protected virtual void DefaultUpload(string filePath)
        {
            Uploading?.Invoke(this, new ElementActionEventArgs(this));

            WrappedElement.SendKeys(filePath);

            Uploaded?.Invoke(this, new ElementActionEventArgs(this));
        }
Beispiel #4
0
        public static IList <UnitDiary> Uploaded()
        {
            IList <UnitDiary> list = Diaries
                                     .Where(UDNumber => UDNumber.RegularDiaries())
                                     .Where(Uploaded => !Uploaded.NotUploaded())
                                     .ToList();

            return(list);
        }
        public static IList <UnitDiary> NotUploaded()
        {
            IList <UnitDiary> list = DiaryList.Diaries
                                     .Where(UDNumber => UDNumber.CertifiedPackages())
                                     .Where(Uploaded => Uploaded.NotUploaded())
                                     .ToList();

            return(list);
        }
 private void StackPanel_Drop(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(DataFormats.FileDrop))
     {
         // Note that you can have more than one file.
         Files = (string[])e.Data.GetData(DataFormats.FileDrop);
         Uploaded?.Invoke(Files);
     }
 }
Beispiel #7
0
        public void AddLink(ImgurUploadInfo u)
        {
            if (this.InvokeRequired)
            {
                AddLinkDel d = new AddLinkDel(AddLink);
                this.Invoke(d, new object[] { u });
                return;
            }

            Uploaded.Add(u);
            AddLabelAndLink(u.file, "", false);
            AddLabelAndLink("Imgur Page:", u.imgur_page, true);
            AddLabelAndLink("Delete Link:", u.delete_hash, true);
        }
        private void ProcessInputStartUpdate()
        {
            Uploadable.BeginUpdate();
            Uploadable.Items.Clear();
            Uploadable.Groups.Clear();

            Uploaded.BeginUpdate();
            Uploaded.Items.Clear();
            Uploaded.Groups.Clear();

            Available.BeginUpdate();
            Available.Items.Clear();
            Available.Groups.Clear();
        }
Beispiel #9
0
        public void AddLink(ImgurUploadInfo u)
        {
            if (this.InvokeRequired)
            {
                AddLinkDel d = new AddLinkDel(AddLink);
                this.Invoke(d, new object[] { u });
                return;
            }

            Uploaded.Add(u);
            AddLabelAndLink(u.file, "", false);
            AddLabelAndLink("Imgur Page:", u.imgur_page, true);
            AddLabelAndLink("Original:", u.original_image, true);
            AddLabelAndLink("Large Thumb:", u.large_thumbnail, true);
            AddLabelAndLink("Small Thumb:", u.small_thumbnail, true);
            AddLabelAndLink("Delete Link:", u.delete_page, true);
        }
        public DTO.Messages.Wrapper UploadFiles(List <IFormFile> Uploading)
        {
            var Result = AuthorizeResponse();

            if (Uploading == null || Uploading.Count == 0)
            {
                Result.Messages.Add("Uploading", "file(s) not found");
            }

            if (Result.Messages.Count > 0)
            {
                Result.Code   = 400;
                Result.Status = "Bad Request";
                return(Result);
            }

            var Files = new HashSet <DTO.Databases.Resource>();

            foreach (var Uploaded in Uploading)
            {
                var UploadedResource = new DTO.Databases.Resource
                {
                    FileName = Uploaded.FileName,
                    MiMe     = Uploaded.ContentType,
                    Length   = Uploaded.Length,
                    Owner    = Token.sub
                };

                Files.Add(UploadedResource);
                using (var FileStream = ResMons.Value.CreateWriteStream(UploadedResource.Id))
                {
                    Uploaded.CopyTo(FileStream);
                    FileStream.Flush();
                }
            }
            Result.Data = Files;
            ResRepo.Collection.InsertMany(Files);
            return(Result);
        }
Beispiel #11
0
        private void QueryControl(NvGpuVmm Vmm, NvGpuPBEntry PBEntry)
        {
            long Position = MakeInt64From2xInt32(NvGpuEngine3dReg.QueryAddress);

            int Seq  = Registers[(int)NvGpuEngine3dReg.QuerySequence];
            int Ctrl = Registers[(int)NvGpuEngine3dReg.QueryControl];

            int Mode = Ctrl & 3;

            if (Mode == 0)
            {
                foreach (List <long> Uploaded in UploadedKeys)
                {
                    Uploaded.Clear();
                }

                //Write mode.
                Vmm.WriteInt32(Position, Seq);
            }

            WriteRegister(PBEntry);
        }
Beispiel #12
0
 void VideosInsertRequest_ResponseReceived(Video Video)
 {
     Uploaded?.Invoke($"https://youtube.com/watch?v={Video.Id}");
 }
        public void GetLocalTrayHistoryUploaded()
        {
            Uploaded.Clear();
            string FileDir  = Path.Combine(path, AccountInfo.Phone);
            string FilePath = Path.Combine(FileDir, "trayHistoryUpload.xml");

            if (!Directory.Exists(FileDir))
            {
                Directory.CreateDirectory(FileDir);
            }
            if (!File.Exists(FilePath))
            {
                XmlHelper.CreateXml(FileDir, "trayHistoryUpload.xml");
            }
            XElement xele = XElement.Load(FilePath);
            var      item = (from ele in xele.DescendantsAndSelf("File")
                             select ele).ToList();

            EmptyIsShow = item.Count < 1;
            if (!EmptyIsShow)
            {
                XmlDocument document = new XmlDocument();
                document.LoadXml(xele.ToString());
                string          str       = JsonConvert.SerializeXmlNode(document);
                JObject         json      = (JObject)JsonConvert.DeserializeObject(str);
                Regex           reg       = new Regex(@"\[[^\[\]]+\]");
                MatchCollection Files     = reg.Matches(str);
                bool            FileCount = Files.Count > 0;
                int             index     = 0;
                if (FileCount)
                {
                    for (int i = 0; i < json["Root"]["File"].Count(); i++)
                    {
                        var cc = json["Root"]["File"][i];
                        Uploaded.Add(new Model.TrayHistory()
                        {
                            Index      = index + 1,
                            CreateDate = Convert.ToDateTime(cc["CreateTime"].ToString()),
                            FileName   = cc["FileName"].ToString(),
                            FileUrl    = cc["FileUrl"].ToString(),
                            //DownloadPath = cc["DownLoadPath"].ToString(),
                            //Id = cc["Id"].ToString()
                        });
                        index++;
                    }
                }
                else
                {
                    var cc = json["Root"]["File"];
                    Uploaded.Add(new Model.TrayHistory()
                    {
                        Index      = index + 1,
                        CreateDate = Convert.ToDateTime(cc["CreateTime"].ToString()),
                        FileName   = cc["FileName"].ToString(),
                        //FileUrl = cc["FileUrl"].ToString(),
                        //DownloadPath = cc["DownLoadPath"].ToString(),
                        Id = cc["Id"].ToString()
                    });
                }
            }
            RunState = false;
        }
Beispiel #14
0
        void STOR(string CmdArguments)
        {
            if (!ConnectedUser.CanStoreFiles)
            {
                SendMessage("426 Access Denied.\r\n");
                return;
            }
            Stream FS = null;

            string Path = ConnectedUser.StartUpDirectory + DirectoryHelper.GetExactPath(CmdArguments, ConnectedUser);

            if (Path.EndsWith("/") || Path.EndsWith(@"\"))
            {
                Path = Path.Substring(0, Path.Length - 1);
            }

            try
            {
                FS = new FileStream(Path, FileMode.Create, FileAccess.Write, FileShare.None);
            }
            catch (Exception Ex)
            {
                SendMessage("550 " + Ex.Message + "\r\n");
                return;
            }

            Socket DataSocket = GetDataSocket();

            if (DataSocket == null)
            {
                return;
            }
            try
            {
                int    ReadBytes = 1;
                byte[] tmpBuffer = new byte[10000];

                do
                {
                    ReadBytes = DataSocket.Receive(tmpBuffer);
                    FS.Write(tmpBuffer, 0, ReadBytes);
                } while (ReadBytes > 0);

                tmpBuffer = null;

                SendMessage("226 Transfer Complete.\r\n");

                // TODO
                // Parse this File And Save to Datebase
                if (Path.EndsWith(".helloworld"))
                {
                    FS.Close();
                    Task.Factory.StartNew(() =>
                    {
                        Uploaded.Invoke(Path);
                    });
                }
            }
            catch (Exception ex)
            {
                SendMessage("426 Connection closed unexpectedly.\r\n");
            }
            finally
            {
                if (DataSocket != null)
                {
                    DataSocket.Shutdown(SocketShutdown.Both);
                    DataSocket.Close();
                    DataSocket = null;
                }
                FS.Close(); FS = null;
            }
        }
 private void ProcessInputEndUpdate()
 {
     Uploadable.EndUpdate();
     Uploaded.EndUpdate();
     Available.EndUpdate();
 }
Beispiel #16
0
 public override string ToString()
 {
     return(String.Format("Title: {0}\nPlayer: {1}\nTank: {2}\n Uploaded: {3}\n URL: \n Description: {5}\n",
                          Title, Player, Tank, Uploaded.ToShortTimeString(), Url, Description));
 }
Beispiel #17
0
 public bool Equals(WorkshopSettings other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Address1, other.Address1, StringComparison.CurrentCulture) && string.Equals(Address2, other.Address2, StringComparison.CurrentCulture) && string.Equals(Address3, other.Address3, StringComparison.CurrentCulture) && AutoBackup == other.AutoBackup && AutoPrintLabels == other.AutoPrintLabels && string.Equals(BackupFilePath, other.BackupFilePath, StringComparison.CurrentCulture) && CentreQuarterlyCheckDate.Equals(other.CentreQuarterlyCheckDate) && Created.Equals(other.Created) && SendMonthlyReport == other.SendMonthlyReport && IsGV212CheckEnabled == other.IsGV212CheckEnabled && IsStatusReportCheckEnabled == other.IsStatusReportCheckEnabled && string.Equals(MainEmailAddress, other.MainEmailAddress, StringComparison.CurrentCulture) && MonthlyGV212Date.Equals(other.MonthlyGV212Date) && string.Equals(Office, other.Office, StringComparison.CurrentCulture) && string.Equals(PhoneNumber, other.PhoneNumber, StringComparison.CurrentCulture) && string.Equals(PostCode, other.PostCode, StringComparison.CurrentCulture) && string.Equals(SecondaryEmailAddress, other.SecondaryEmailAddress, StringComparison.CurrentCulture) && string.Equals(Town, other.Town, StringComparison.CurrentCulture) && Uploaded.Equals(other.Uploaded) && UserId == other.UserId && string.Equals(WorkshopName, other.WorkshopName, StringComparison.CurrentCulture));
 }