Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

pr1mem0ver

@pr1mem0ver
About
Posts
43
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    Actually both apply here. Honestly, I am having difficulty with the pricing model because yes... what I am building will provide a much needed resource in education and instructional design (both public and private) and I don't want people to have to pay significant sums of money for the "much needed" aspect of what I am building. At the same time, it would be nice to make some money because as a teacher I get paid relatively little.

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    1. You didn't answer my question... didn't even try. Instead you try to justify your lack of trying by appealing to obscure implications. 2. I explicitly stated in my original post (and quoted) that the resemblance is superficial. You made the choice to not believe me. 3. This is a C# forum. Subversion is written in C++. Which I can sort of follow... but with great difficulty when it comes to try and find a single feature in such a complex set of code. 4. You are focusing on your own approach to solving my problem rather than trusting me to know what I need. Much of the groundwork code for the application (including the data miner) has ALREADY been written and works reasonably well. I only need to know how to enable multiple users to manipulate data from files on a single source at once. I don't need a giant solution which is superficially related to solve a single problem. Especially when I am just asking about an approach. Maybe a different title to this issue would have worked better but I am only human (and not a professional programmer). EDIT: Someone who was helpful on another forum suggested that the approach may be similar to Subversion (he used Git as his example) even if the resemblance is superficial. Yet he still managed to focus on my question and actually partially answer it on the first try (still in confirming what he said) instead of wading through all this... uh... crap. That was all I needed. You could have at the very least, explained yourself. I only didn't "give it three seconds of thought" because I am not "trying to replicate Git/DevOps/or other SVN" as you and other people have assumed and from all appearances, that was the reasoning behind your suggestion.

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    LOL. IF I remain on this site, I will post the patent here when I get it. If I am able to finish the project, it will happen. I love how you all feel your experience in programming entitles you to points. I find it terribly ironic I can upvote my own comments. Honestly, I don't give a rats butt about my reputation here. I only come to help myself and others in repayment. It's really a shame that folks like you pick and choose to ruin it for other people. You guys continue to make erroneous assumptions about everything under the sun, talking about everything EXCEPT the answer to the question I asked. After this crap treatment I won't bother coming here again to ask questions. So rest easy and pat yourself on the back for making your point on a job well done. I also won't have anything nice to say about this forum anymore. I know you don't care but oh well... can't help that. I am an elementary school teacher for Pete's sake.

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    Dave Kreskowiak wrote:

    It sounds very much like you're trying to replicate Git/DevOps/or other SVN, like Subversion (open source). Why reinvent the wheel when you can use a system that's already made to do the job?

    Because once again you are making erroneous assumptions. You aren't even in the correct industry. How do you get that out of this (from my original post)?

    In the end it would work somewhat similar to a code management system but it isn't code being developed and that comparison is somewhat superficial. A centralized system harvests tasks (based on information gathered) from the internet and those tasks get distributed among specialists to look at the data, standardize it, format it, build upon it, and submit it for integration into the main "fork"/trunk so to speak.

    Code management systems don't "harvest" data from the internet (at least not "en masse"... not at all as far as I am aware). Instead, people post "data" (code, feedback, comments, etc...) The closest thing (VERY superficial and still in a different ballpark altogether, though it is the same industry,) is iReady which you probably haven't even heard of. I am not in the coding industry. I am not a professional programmer (though I am capable enough). If all you are going to do is speculate about my purpose rather than help by answering my question original question "Any pointers to get me started?", then please stop posting. EDIT: Just as an FYI, the end game (public product) isn't even the software I am writing (project for which I am trying to find an approach for/asking about). The software/project I am currently doing is a development tool for the Team ONLY (and possibly for other "users" who eventually want to mod/contribute to the end product being created... the likes of which doesn't exist at all).

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    I asked a single, non-specific question. "Any pointers on where to get started?" Yes. I know I was "vague" in the details. I was that way on purpose given the nature of the project. However, I feel I gave enough to answer the question by giving a basic run-down of the kind of application it was. I ask and people just assume I am recruiter misusing the forum. I am also not asking a detailed question, nor am I looking for a detailed answer (which I realize is probably not in line with the default around here). Just pointers; a basic idea for me to look up. I don't need specifics. I can find them myself. I even gave an example in the "details" of the kind of answer I was looking for: "client-server." If people focused on the question as is rather than "details" there would be fewer conflicts and frustrations. If one needs specifics to answer the question, then ask. It's that simple. The first person to answer (Pete) asked a legitimate question looking for details and I answered him with the details he needed. No problems on either side. He also didn't assume a negative spin, even in his later comment in which he suggested I was either altruistic or motivated by money.

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    LOL. I am not this vague when talking to people about the actual project. I already have two other people who seem rather interested in working on it and have asked me to let them know when I am ready to go. I am being vague here because most details aren't really necessary to share and because the project (end result) will be patented. I can't exactly discuss specific details on a public forum if I want to file for a patent. Whatever details people need to be shared I will share if asked for (and don't require me to be too explicit in detail).

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    Wow... you guys make all kinds of incorrect assumptions and right now I am so angry that I may just quit this forum myself after being a member for years. I have NEVER been treated this way here before. No need to kick me off. This is a legitimate question. I only use this forum when I need help. I am programming it myself if I can. I don't want help with the actual programming if I can avoid it so I am not looking for programmers. You people don't even have the expertise I am looking for so bug off. Otherwise answer my question. I just need some advice.

    C# collaboration database sysadmin hosting cloud

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    It is merged after it is reviewed. Once I gain confidence that a team member is doing what I need them to, following the vision I have, they would have rights to merge it themselves. "Can multiple people be touching the same data at the same time?" Same target/source files... yes. Same actual data, no (though theoretically it could happen... would probably have to write checks/locks into the code). The approach I intend on taking is to hire different people with different strengths and backgrounds so each individual task would only be touched by one team member.

    C# collaboration database sysadmin hosting cloud

  • web controls in windows forms
    P pr1mem0ver

    Ok... thanks for the heads up. I copied the embedded link provided to me by imgbb, not aware of this issue. I wanted to just embed an image but there doesn't seem to be a direct way to do that. I just wanted to demonstrate the capabilities of the solution I was proposing. The software I showed in the picture isn't even available... (at least not yet), so I am not sure how that could qualify as spam (other than in appearance).

    C# csharp wpf html asp-net winforms

  • web controls in windows forms
    P pr1mem0ver

    I have used a great resource for something similar. It doesn't support everything (such as css) but if you are looking to create html aware forms in Windows.Forms, the HTMLRenderer NuGet packages are perfect (you may be stuck with .NET Framework as the support for .NET Core is questionable). It is also specific to HTML 4.1. I believe it does support bulleted lists as long as you don't mind that you can't use CSS. (It says it can but CSS is only partially implemented so many of its features do not work). EDIT: Here is an image of an example control I made with these packages which make use of bulleted lists: ibb.co/6b4JSJQhtml-control-example [edit]Link made visible (your choice if you follow it, but it seems to be some link shortening image site) : OriginalGriff[/edit]

    C# csharp wpf html asp-net winforms

  • New Kind of Application for me (centralized/cloud). Looking for learning resources.
    P pr1mem0ver

    I am creating a new kind of "development" platform that uses a custom data model (custom classes etc...). The thing is that the development is going to require a significant amount of collaboration and work by different users (members of a team), potentially all at once. All data needs to stored in one place. In the end it would work somewhat similar to a code management system but it isn't code being developed and that comparison is somewhat superficial. A centralized system harvests tasks (based on information gathered) from the internet and those tasks get distributed among specialists to look at the data, standardize it, format it, build upon it, and submit it for integration into the main "fork"/trunk so to speak. I am probably looking at a client-server model but since this approach to data storage, programming, and most importantly, data sharing is entirely new to me, I am not certain which model to use and not sure where to look to find information to teach me how to build such an application/data model. Internet searches so far get too broad of results that aren't helpful (such as how to use and distribute a database or information on data services). Any pointers to get me started? I am also looking for a secure place/server to store the data for people on the team to access. It doesn't need to be incredibly big. Frankly Google Drive is plenty of space. Not sure how I would leverage that though (through the software).

    C# collaboration database sysadmin hosting cloud

  • How to "Reach" content of an XML node/tag (and turn it into a new reader)
    P pr1mem0ver

    Thanks, I used a mix of XmlReader and XmlDocument to resolve it so it is similar to your suggestion.

    C# question xml tutorial

  • How to "Reach" content of an XML node/tag (and turn it into a new reader)
    P pr1mem0ver

    I have a project that will end up language dependent. I am also fairly new to XML in terms of reading it from files. I need to use XML for information used by the project and that information will be available in several languages. So the basic structure of the XML is this:

            SomeName
            SN
            Some Description of what this represents
    

    The code that does this and then the code that deserializes the information is this:

    public static DataClassNode Deserialize(XmlReader reader, CultureInfo culturalLanguage)
    {
    XmlReader found = null;
    XmlReader _default = null;
    while (found == null)
    {
    if (reader.ReadToFollowing("Language"))
    {
    if (reader.MoveToAttribute("ID"))
    {
    string id = reader.ReadContentAsString();
    reader.MoveToElement(); // Is this how I get to the contents of the language node?
    if (id.Equals(culturalLanguage.Name))
    {
    // not sure how to read the contents of the node
    found = XmlReader.Create(reader.ReadElementContentAsString()); // throws exception
    // 'Element' is an
    // invalid XML Node Type
    }
    else if (id.Equals(DefaultCulture.Name))
    {
    _default = XmlReader.Create(reader.ReadInnerXml().ToStream());
    }
    }
    }
    else
    break;
    }
    if (found == null)
    {
    if (_default == null)
    throw new Exception("Default Language Not Found!");
    else
    found = _default;
    }

    DataContractSerializer serializer = new DataContractSerializer(typeof(DataClassNode));
    DataClassNode flagtag = (DataClassNode)serializer.ReadObject(found);
    if (flagtag == null)
    	throw new Exception("Cannot deserialize DataClassNode Object!");
    return flagtag;
    

    }

    I have been able to navigate to the language and make sure the one needed is found. Now I need to populate a class instance with the data inside the language node. I am using DataContractSerializer so I want a new XMLreader instance that contains the content of the language node ONLY. Not sure how to do this though. I know how to read strings etc... just not sure how to read the contents of the language node. I have tried what is above. I have tried InnerXML and OuterXML. Both of these return "None" as my XML. My comments point to where my knowledge falls short.

    C# question xml tutorial

  • Will calling a new method/property work if called on a "base" abstract object
    P pr1mem0ver

    Well you can't override non-virtual/abstract methods or properties and I can't change Microsoft's base classes. Pretty annoying because it would be a simple solution to a now a more complex problem. I am guessing I will have to make a wrapper.

    C# question

  • Will calling a new method/property work if called on a "base" abstract object
    P pr1mem0ver

    Nevermind. Found the answer myself with a few test classes:

    public class CoreClass
    {
    public int Value { get { return 1; } }
    }

    public class ClassA : CoreClass
    {
    public new int Value { get { return 2; } }
    }

    public class ClassB : CoreClass
    {
    public new int Value { get { return 3; } }
    }

    public class ClassC : CoreClass
    {
    public new int Value { get { return 4; } }
    }

    public class ClassD : CoreClass
    {
    public new int Value { get { return 5; } }
    }

    public class ContainerClass
    {
    public CoreClass CoreObject { get; set; }
    public int CoreValue { get { return CoreObject.Value; } }

    public ContainerClass(CoreClass instance) { CoreObject = instance; }
    

    }

    static void Main(string[] args)
    {
    ContainerClass a = new ContainerClass(new ClassA());
    ContainerClass b = new ContainerClass(new ClassB());
    ContainerClass c = new ContainerClass(new ClassC());
    ContainerClass d = new ContainerClass(new ClassD());

    int av = a.CoreValue;
    int bv = b.CoreValue;
    int cv = c.CoreValue;
    int dv = d.CoreValue;	
    

    }

    Bummer... all the int values in Main were 1. So looks like it calls the base class method and not the derived one. Looks like I will need to try a different approach.

    C# question

  • Will calling a new method/property work if called on a "base" abstract object
    P pr1mem0ver

    I am working with SharpCompress and creating a parser that creates objects mimicking real folder structures to use in various browsable controls. Since the IEntry and IArchiveEntry interfaces in SharpCompress have all the makings of an "info" class, I have created two custom Info classes derived from System.IO.FileSystemInfo. Because most of the properties are NOT virtual, I have to use the new keyword to override them so that I can grab the info from the Entry object instead of the file system. I want to use the base class FileSystemInfo to supply much of the data for my virtual file system object class. However, I am not sure if using the FileSystemInfo object will work with the derived classes that hide the original properties. Check the relevant part of my code below:

    public class IOObjectNode : TreeNode;
    {
    FileSystemInfo info;
    FileInfo file;
    DirectoryInfo folder;
    ArchiveDirectoryInfo virtualFolder;
    ArchiveFileInfo virtualFile;

    IEntry entry;
    public string FileName { get { return info.Name; } }
    public string Path { get { return System.IO.Path.GetDirectoryName(info.FullName); } }
    public string FullName { get { return info.FullName; } }
    public DateTime LastWriteTime { get { return info.LastWriteTime; } }
    public DateTime CreationTime { get { return info.CreationTime; } }
    public long Size { get { if (file != null) return file.Length; else return 0; } }
    public long Length { get { return Size; } }
    public IOObjectNode() { }
    public void Populate(IEntry entry) { SharpEntry = entry; }
    public void Populate(FileSystemInfo info) { ShellInfo = info; }
    
    public FileSystemInfo ShellInfo
    {
    	get { return info; }
    	protected set
    	{
    		info = value;
    		file = value as FileInfo;
    		folder = value as DirectoryInfo;
    		virtualFolder = value as ArchiveDirectoryInfo;
    		virtualFile = value as ArchiveFileInfo;
    
    		UpdateResources();
    	}
    }
    
    public IEntry SharpEntry
    {
    	get { return entry; }
    	protected set
    	{
    		entry = value;
    		UpdateResources();
    	}
    }
    

    }

    Notice my use of "info" in some of the properties above. Will this work with my custom class instances when info is the base class?

    C# question

  • Derived Treeview override not being called at all.
    P pr1mem0ver

    I have the following treeview class whose purpose is to draw an overlay on the icons in a node. Notice it overrides "OnDrawNode":

    /// /// A method that is supplied to the OverlayTreeView class to retrieve the overlay for a particular node
    ///
    /// The node being drawn
    ///
    public delegate Image GetTreeIconOverlayMethod(TreeNode node);

    public class OverlayTreeView : TreeView
    {
    bool drawOverlay;
    int iconHeight;
    int iconWidth;

    public GetTreeIconOverlayMethod GetIconOverlay { get; set; }
    
    public OverlayTreeView() { }
    protected override void OnHandleCreated(EventArgs e)
    {
    	base.OnHandleCreated(e);
    	if (ImageList != null)
    	{
    		drawOverlay = true;
    		iconHeight = ImageList.ImageSize.Height;
    		iconWidth = ImageList.ImageSize.Width;
    	}
    }
    
    protected override void OnDrawNode(DrawTreeNodeEventArgs e)
    {
    	base.OnDrawNode(e);
    
    	Image overlay = null;
    	if (drawOverlay)
    		if (GetIconOverlay != null)
    			if (!((e.Node.ImageIndex == -1) && (e.Node.ImageKey == null)))
    				overlay = GetIconOverlay(e.Node);
    	if (overlay != null)
    	{
    		int x = e.Node.Bounds.X + iconWidth - overlay.Width;
    		int y = e.Node.Bounds.Y + iconHeight - overlay.Height;
    		e.Graphics.DrawImage(overlay, x, y);
    	}
    }
    

    }

    The overlay is not being drawn and it seems this is because the override is not being called at all. Any breakpoint put in this method does NOT gte triggered even though a breakpoint in OnHandleCreated is. It doesn't matter where I put the breakpoint within the method. (And yes... symbols are loaded). I have no idea why this would occur...

    C# graphics debugging

  • Seeking a better understanding of .NET multithreading and the System.Threading.Tasks.Parallel methods
    P pr1mem0ver

    I forgot to thank you for your help back in April. Thanks!

    C# csharp design performance learning

  • Seeking a better understanding of .NET multithreading and the System.Threading.Tasks.Parallel methods
    P pr1mem0ver

    Thanks Richard. That helps; particularly the info about Parallel itself being syncronous. I knew about the async void issue from my research while solving issues. My real method is Task (just like yours). Being relatively new to asynchronous code, I just forgot about it when simplifying my code. Just to clear things up: So anything inside the Parallel.For/Foreach will run syncronously; except of course if it calls an asynchronous method correct?

    C# csharp design performance learning

  • Seeking a better understanding of .NET multithreading and the System.Threading.Tasks.Parallel methods
    P pr1mem0ver

    I have a project that needs the ability to modify dozens, hundreds, and potentially thousands of file modifications which are fairly intensive and affect associated resource files as well. To speed things up and maximize the ability to process multiple threads to take advantage of parallel processing I decided to use the System.Threads.Tasks.Parallel class to drive these file changes. There are a few things that I have learned and discovered along the way that I would like to better understand. First, before I go any further, my project has a BIG need to track all changes in a log file that occur BEFORE they happen to minimize the risk of losing data when something goes wrong. That log file is then parsed for undo actions. This requires the chain of events to be tracked; and logging each change before it happens requires several sub-tasks that use .NET's await feature. A basic picture of the process used to change the files looks something like this:

    public class MainFileType
    {
    internal async void DoSomeMajorChanges(RichTextboxBuilder builder, StreamWriter changeLog)
    {
    bool result;
    await Task.Run(new Action(() => changeLog.LogAction(this))).ConfigureAwait(false);
    await Task.Run(new Action(()=> result = coreFile.DoChanges())).ConfigureAwait(false);
    builder.Control.BeginInvoke(new Action() builder.NotifyUser("Some Change Occurred", Color.Red));
    foreach (ResourceFile file in this.AssociatedFiles)
    {
    await Task.Run(new Action(() => changeLog.LogAction(file))).ConfigureAwait(false);
    await Task.Run(new Action(() => result |= file.DoChanges())).ConfigureAwait(false);
    builder.Control.BeginInvoke(new Action() builder.NotifyUser("Some Change Occurred", Color.Blue));
    }
    return result;
    }
    }

    This code is called by a UI that is shown any time a single or multiple files are modified. The UI regularly reports to the user:

    public class ChangeManagerUI : Form
    {
    private bool processed;
    object task;
    StreamWriter parseableActionLog;

    private void OnFormShown(object sender, EventArgs e)
    {
        if (!processed)
        {
            processed = true;
            MainFileType file;
            RichTextboxBuilder builder = null;
            List batch = task as List;
            Refresh();
            if (batch != null)
            {
                RichTextboxBuilder.BeginConcurrentAppendProcess(this, batch.Count);
    
    C# csharp design performance learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups